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 <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2018-11-28 15:04:51 +01:00
parent 629fdca0d0
commit 616beb17d4

View File

@ -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"));
}