[libvirt] [PATCH v2] qemu: Remove explicit values from virQEMUCapsFlags

Jiri Denemark jdenemar at redhat.com
Wed Oct 7 08:33:38 UTC 2015


On Wed, Oct 07, 2015 at 10:24:50 +0200, Andrea Bolognani wrote:
> This gets rid of the partially enforced alignment and makes it less
> likely for a bogus value to be introduced in the enumeration.
> 
> Use #define for QEMU_CAPS_NET_NAME and QEMU_CAPS_HOST_NET_ADD, both
> of which are aliases for QEMU_CAPS_0_10.
> ---
> First attempt was
> 
>   [libvirt] [PATCH] qemu: Align virQEMUCapsFlags members
>   https://www.redhat.com/archives/libvir-list/2015-October/msg00112.html
> 
> Changes based on suggestions from Dan and Jirka.
> 
>  src/qemu/qemu_capabilities.h | 415 +++++++++++++++++++++----------------------
>  1 file changed, 206 insertions(+), 209 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index a1d98d0..b5b1af4 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -32,217 +32,214 @@
>  
>  /* Internal flags to keep track of qemu command line capabilities */
>  typedef enum {

+    /* 0 */

> +    QEMU_CAPS_KQEMU, /* Whether KQEMU is compiled in */
> +    QEMU_CAPS_VNC_COLON, /* VNC takes or address + display */
> +    QEMU_CAPS_NO_REBOOT, /* Is the -no-reboot flag available */
> +    QEMU_CAPS_DRIVE, /* Is the new -drive arg available */
> +    QEMU_CAPS_DRIVE_BOOT, /* Does -drive support boot=on */

+
+    /* 5 */

> +    QEMU_CAPS_NAME, /* Is the -name flag available */
> +    QEMU_CAPS_UUID, /* Is the -uuid flag available */
> +    QEMU_CAPS_DOMID, /* Xenner: -domid flag available */
> +    QEMU_CAPS_VNET_HDR,
> +    QEMU_CAPS_MIGRATE_KVM_STDIO, /* avoid kvm tcp migration bug */

+
+    /* 10 */

> +    QEMU_CAPS_MIGRATE_QEMU_TCP, /* have qemu tcp migration */
> +    QEMU_CAPS_MIGRATE_QEMU_EXEC, /* have qemu exec migration */
> +    QEMU_CAPS_DRIVE_CACHE_V2, /* cache= flag wanting new v2 values */
> +    QEMU_CAPS_KVM, /* Whether KVM is enabled by default */
> +    QEMU_CAPS_DRIVE_FORMAT, /* Is -drive format= avail */

...

That is, group them by 5 and separate the groups with empty lines so that
the list looks like the corresponding definition in qemu_capabilities.c.

Jirka




More information about the libvir-list mailing list