From: Andrea Bolognani Date: Wed, 28 Nov 2018 14:04:51 +0000 (+0100) Subject: qemu: Use more specific prefixes X-Git-Tag: v5.1.0-rc1~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=616beb17d44e17f77ac4505eb014fb7cacb04b34;p=thirdparty%2Flibvirt.git qemu: Use more specific prefixes While the chances of the current checks resulting in false positives are basically zero, it's still nicer to check for the full prefix instead of the prefix's prefix. Signed-off-by: Andrea Bolognani --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 021fac15c1..4bc849faf4 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -9885,7 +9885,7 @@ qemuDomainIsQ35(const virDomainDef *def) bool qemuDomainMachineIsQ35(const char *machine) { - return (STRPREFIX(machine, "pc-q35") || + return (STRPREFIX(machine, "pc-q35-") || STREQ(machine, "q35")); } @@ -9903,7 +9903,7 @@ qemuDomainMachineIsI440FX(const char *machine) return (STREQ(machine, "pc") || STRPREFIX(machine, "pc-0.") || STRPREFIX(machine, "pc-1.") || - STRPREFIX(machine, "pc-i440") || + STRPREFIX(machine, "pc-i440fx-") || STRPREFIX(machine, "rhel")); }