From: Daniel P. Berrange Date: Wed, 6 Nov 2013 07:31:24 +0000 (+0800) Subject: Don't expose 'none' machine type to capabilities X-Git-Tag: v1.2.0-rc1~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbb6ec42e2447d7920b30d66923b2a2b2670133b;p=thirdparty%2Flibvirt.git Don't expose 'none' machine type to capabilities 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 --- diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2712a4defd..548b988713 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -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 ||