diff options
author | David 'Digit' Turner <digit@android.com> | 2010-09-07 06:21:25 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-09-08 02:33:45 -0700 |
commit | e92bc56ef89ab8b51c4c89d4d9779b64e9491b9b (patch) | |
tree | cb39ae2fb8b3cdd445b74f6b43b4d37280eb320c /qemu-char-android.c | |
parent | a7f114bcbd85d71f59f716df5a38340bdfe30637 (diff) | |
download | external_qemu-e92bc56ef89ab8b51c4c89d4d9779b64e9491b9b.zip external_qemu-e92bc56ef89ab8b51c4c89d4d9779b64e9491b9b.tar.gz external_qemu-e92bc56ef89ab8b51c4c89d4d9779b64e9491b9b.tar.bz2 |
Add new "qemu monitor" command to the console.
This allows you to access the QEMU virtual machine monitor directly
from the console (instead of playing with the command-line to do it).
The implementation of the 'quit' command has been modified to simply
close the connection, instead of stopping the emulator program.
This patch introduces changes that allow a console session to be
detached and redirected at runtime to other internal services of
the emulator program. This will be useful in the future to implement
other features.
+ doc typo
+ add proper definitions for CONFIG_ANDROID on config-host.h
+ remove obsolete sysdeps.h dependency in android/console.c
Change-Id: If16cfe41c12a26eb8f56e3a9c24452eafa5efab4
Diffstat (limited to 'qemu-char-android.c')
-rw-r--r-- | qemu-char-android.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qemu-char-android.c b/qemu-char-android.c index b468606..ca854b9 100644 --- a/qemu-char-android.c +++ b/qemu-char-android.c @@ -2088,6 +2088,17 @@ static CharDriverState *qemu_chr_open_tcp(const char *host_str, fd = unix_connect(host_str); } } else { +#ifdef CONFIG_ANDROID + if (!strncmp(host_str,"socket=",7)) { + char *end; + long val = strtol(host_str+7, &end, 10); + if (val <= 0 || end == host_str+7) { + printf("Invalid socket number: '%s'\n", host_str+7); + goto fail; + } + fd = (int) val; + } else +#endif if (is_listen) { fd = inet_listen(host_str, chr->filename + offset, 256 - offset, SOCKET_STREAM, 0); |