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

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

 



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
> 
>    [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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]