mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
629fdca0d0
commit
616beb17d4
@ -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"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user