From 740039680192eccea71b7a3bce392862d6f6c33b Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 5 Nov 2009 14:41:24 +0100 Subject: [PATCH] Detect availability of QEMU -chardev CLI option * src/qemu/qemu_conf.h: defines a new QEMUD_CMD_FLAG_CHARDEV flag * src/qemu/qemu_conf.c: parse the output for -chardev and set flag appropriately --- src/qemu/qemu_conf.c | 2 ++ src/qemu/qemu_conf.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d77fd6ff0d..ddd8db9d54 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -894,6 +894,8 @@ static unsigned int qemudComputeCmdFlags(const char *help, flags |= QEMUD_CMD_FLAG_PCIDEVICE; if (strstr(help, "-mem-path")) flags |= QEMUD_CMD_FLAG_MEM_PATH; + if (strstr(help, "-chardev")) + flags |= QEMUD_CMD_FLAG_CHARDEV; if (version >= 9000) flags |= QEMUD_CMD_FLAG_VNC_COLON; diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 42b8f56b7a..5d433d38db 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -72,6 +72,7 @@ enum qemud_cmd_flags { QEMUD_CMD_FLAG_DRIVE_SERIAL = (1 << 19), /* -driver serial= available */ QEMUD_CMD_FLAG_XEN_DOMID = (1 << 20), /* -xen-domid (new style xen integration) */ QEMUD_CMD_FLAG_MIGRATE_QEMU_UNIX = (1 << 21), /* Does qemu support unix domain sockets for migration? */ + QEMUD_CMD_FLAG_CHARDEV = (1 << 22), /* Is the new -chardev arg available */ }; /* Main driver state */ -- GitLab