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
This commit is contained in:
Matthew Booth 2009-11-05 14:41:24 +01:00 committed by Daniel Veillard
parent 89d549c3eb
commit 7400396801
2 changed files with 3 additions and 0 deletions

View File

@ -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;

View File

@ -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 */