[libvirt] [PATCH] Don't expose 'none' machine type to capabilities

Eric Blake eblake at redhat.com
Mon Nov 11 15:12:59 UTC 2013


On 11/11/2013 04:15 AM, Daniel P. Berrange wrote:
> 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(+)

ACK.

> 
> 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 ||
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131111/de4ebc93/attachment-0001.sig>


More information about the libvir-list mailing list