]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: use on|off instead of yes|no for -drive boolean properties
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Feb 2021 12:18:55 +0000 (12:18 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 16 Feb 2021 14:03:13 +0000 (14:03 +0000)
QEMU has long accepted many different values for boolean properties, but
set accepted has been different depending on which QEMU parser you hit.

The on|off values were supported by all QEMU parsers. The yes|no, y|n,
true|false values were only partially supported:

  https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg01012.html

Thus we should standardize on on|off everywhere since that is most
widely supported in QEMU.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/virqemu.c

index 4136012c7000452db9936dcb6afa7355eafe3705..5b0dc25bc116c0947742fa8e627a0c341eaca068 100644 (file)
@@ -362,7 +362,7 @@ virQEMUBuildDriveCommandlineFromJSON(virJSONValuePtr srcdef)
 {
     g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
 
-    if (virQEMUBuildCommandLineJSON(srcdef, &buf, NULL, false,
+    if (virQEMUBuildCommandLineJSON(srcdef, &buf, NULL, true,
                                     virQEMUBuildCommandLineJSONArrayNumbered) < 0)
         return NULL;