From cbb6ec42e2447d7920b30d66923b2a2b2670133b Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 6 Nov 2013 15:31:24 +0800 Subject: [PATCH] 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 --- src/qemu/qemu_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) 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 ||