]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't expose 'none' machine type to capabilities
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 6 Nov 2013 07:31:24 +0000 (15:31 +0800)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 12 Nov 2013 10:47:30 +0000 (10:47 +0000)
The 'none' machine type is something only intended for use
by libvirt probing capabilities. It isn't something that
is useful for running real VM instances. As such it should
not be exposed to users in the capabilities.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/qemu/qemu_capabilities.c

index 2712a4defdaba6ce2309d5a2565e59827bbbb514..548b988713504779eba3dfd05d70e984b0b3913e 100644 (file)
@@ -2137,6 +2137,8 @@ virQEMUCapsProbeQMPMachineTypes(virQEMUCapsPtr qemuCaps,
         goto cleanup;
 
     for (i = 0; i < nmachines; i++) {
+        if (STREQ(machines[i]->name, "none"))
+            continue;
         qemuCaps->nmachineTypes++;
         if (VIR_STRDUP(qemuCaps->machineAliases[qemuCaps->nmachineTypes -1],
                        machines[i]->alias) < 0 ||