Re: [PATCH 6/7] Introduce qemuDomainMachineIsVirt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 03, 2016 at 12:47:26 +0200, Ján Tomko wrote:
> Use it everywhere except for virQEMUCapsFillDomainFeatureGICCaps.
> ---
>  src/qemu/qemu_capabilities.c   |  3 +--
>  src/qemu/qemu_command.c        |  3 +--
>  src/qemu/qemu_domain.c         | 18 +++++++++++-------
>  src/qemu/qemu_domain.h         |  1 +
>  src/qemu/qemu_domain_address.c |  6 ++----
>  5 files changed, 16 insertions(+), 15 deletions(-)
> 



> @@ -4653,6 +4649,14 @@ qemuDomainMachineIsS390CCW(const virDomainDef *def)
>  }
>  
>  
> +bool
> +qemuDomainMachineIsVirt(const virDomainDef *def)
> +{
> +    return STREQ(def->os.machine, "virt") ||
> +           STRPREFIX(def->os.machine, "virt-");

This could be transcribed as:
strcmp(def->os.machine, "virt") ||
strncmp(def->os.machine, "virt-", strlen("virt-")) so
"STRPREFIX(def->os.machine, "virt")" should be equivalent.

ACK regrardless.

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]