diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-02-25 12:30:01 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-25 12:30:01 +0000 |
commit | 0459650d94d18218808fcabc8c3227d2ee99af39 (patch) | |
tree | 89b1f02e7e4784c444faf91506ca7fcfd8bb7e7b /qga/main.c | |
parent | 05fd3bf2a1c9fc26414d3cf608732c40d0d9eb23 (diff) | |
parent | a749f42da5129bbfadea6926964d9a213ed4bc5f (diff) | |
download | hqemu-0459650d94d18218808fcabc8c3227d2ee99af39.zip hqemu-0459650d94d18218808fcabc8c3227d2ee99af39.tar.gz |
Merge remote-tracking branch 'remotes/mdroth/qga-pull-2014-02-24' into staging
* remotes/mdroth/qga-pull-2014-02-24:
qemu-ga: isa-serial support on Windows
qga: Fix memory allocation pasto
qga: Don't require 'time' argument in guest-set-time command
qga: vss-win32: Fix interference with snapshot deletion by other VSS request
qga: vss-win32: Fix interference with snapshot creation by other VSS requesters
qga: vss-win32: Use NULL as an invalid pointer for OpenEvent and CreateEvent
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qga/main.c')
-rw-r--r-- | qga/main.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -47,9 +47,11 @@ #ifndef _WIN32 #define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0" #define QGA_STATE_RELATIVE_DIR "run" +#define QGA_SERIAL_PATH_DEFAULT "/dev/ttyS0" #else #define QGA_VIRTIO_PATH_DEFAULT "\\\\.\\Global\\org.qemu.guest_agent.0" #define QGA_STATE_RELATIVE_DIR "qemu-ga" +#define QGA_SERIAL_PATH_DEFAULT "COM1" #endif #ifdef CONFIG_FSFREEZE #define QGA_FSFREEZE_HOOK_DEFAULT CONFIG_QEMU_CONFDIR "/fsfreeze-hook" @@ -189,6 +191,8 @@ static void usage(const char *cmd) " -m, --method transport method: one of unix-listen, virtio-serial, or\n" " isa-serial (virtio-serial is the default)\n" " -p, --path device/socket path (the default for virtio-serial is:\n" +" %s,\n" +" the default for isa-serial is:\n" " %s)\n" " -l, --logfile set logfile path, logs to stderr by default\n" " -f, --pidfile specify pidfile (default is %s)\n" @@ -215,7 +219,8 @@ static void usage(const char *cmd) " -h, --help display this help and exit\n" "\n" "Report bugs to <mdroth@linux.vnet.ibm.com>\n" - , cmd, QEMU_VERSION, QGA_VIRTIO_PATH_DEFAULT, dfl_pathnames.pidfile, + , cmd, QEMU_VERSION, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, + dfl_pathnames.pidfile, #ifdef CONFIG_FSFREEZE QGA_FSFREEZE_HOOK_DEFAULT, #endif @@ -659,12 +664,16 @@ static gboolean channel_init(GAState *s, const gchar *method, const gchar *path) } if (path == NULL) { - if (strcmp(method, "virtio-serial") != 0) { + if (strcmp(method, "virtio-serial") == 0 ) { + /* try the default path for the virtio-serial port */ + path = QGA_VIRTIO_PATH_DEFAULT; + } else if (strcmp(method, "isa-serial") == 0){ + /* try the default path for the serial port - COM1 */ + path = QGA_SERIAL_PATH_DEFAULT; + } else { g_critical("must specify a path for this channel"); return false; } - /* try the default path for the virtio-serial port */ - path = QGA_VIRTIO_PATH_DEFAULT; } if (strcmp(method, "virtio-serial") == 0) { |