[libvirt] [PATCH] Don't expose 'none' machine type to capabilities
Daniel P. Berrange
berrange at redhat.com
Mon Nov 11 11:15:32 UTC 2013
From: "Daniel P. Berrange" <berrange at redhat.com>
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 at redhat.com>
---
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 2712a4d..548b988 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 ||
--
1.8.3.1
More information about the libvir-list
mailing list