[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/2] Detect availability of legacy QEMU -vmchannel command line option



On Tue, Nov 03, 2009 at 04:11:47PM +0000, Matthew Booth wrote:
> * src/qemu/qemu_conf.[ch]: Detect -vmchannel command line option
> ---
>  src/qemu/qemu_conf.c |    2 ++
>  src/qemu/qemu_conf.h |    1 +
>  2 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 0fbc190..33a55d7 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -878,6 +878,8 @@ static unsigned int qemudComputeCmdFlags(const char *help,
>          flags |= QEMUD_CMD_FLAG_MEM_PATH;
>      if (strstr(help, "-chardev"))
>          flags |= QEMUD_CMD_FLAG_CHARDEV;
> +    if (strstr(help, "-vmchannel"))
> +        flags |= QEMUD_CMD_FLAG_VMCHANNEL;
>  
>      if (version >= 9000)
>          flags |= QEMUD_CMD_FLAG_VNC_COLON;
> diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
> index 4aa764b..dc3c5c3 100644
> --- a/src/qemu/qemu_conf.h
> +++ b/src/qemu/qemu_conf.h
> @@ -72,6 +72,7 @@ enum qemud_cmd_flags {
>      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 */
> +    QEMUD_CMD_FLAG_VMCHANNEL     = (1 << 23), /* Is the RHEL5-only -vmchannel arg available */

I would suggest to move the definition to another place in the enum
(toward the beginning) and bump the value significantly (1 << 31) for
example to limit the conflict as upstream code evolve >:->

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]