提交 616beb17 编写于 作者: A Andrea Bolognani

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: NAndrea Bolognani <abologna@redhat.com>
上级 629fdca0
...@@ -9885,7 +9885,7 @@ qemuDomainIsQ35(const virDomainDef *def) ...@@ -9885,7 +9885,7 @@ qemuDomainIsQ35(const virDomainDef *def)
bool bool
qemuDomainMachineIsQ35(const char *machine) qemuDomainMachineIsQ35(const char *machine)
{ {
return (STRPREFIX(machine, "pc-q35") || return (STRPREFIX(machine, "pc-q35-") ||
STREQ(machine, "q35")); STREQ(machine, "q35"));
} }
...@@ -9903,7 +9903,7 @@ qemuDomainMachineIsI440FX(const char *machine) ...@@ -9903,7 +9903,7 @@ qemuDomainMachineIsI440FX(const char *machine)
return (STREQ(machine, "pc") || return (STREQ(machine, "pc") ||
STRPREFIX(machine, "pc-0.") || STRPREFIX(machine, "pc-0.") ||
STRPREFIX(machine, "pc-1.") || STRPREFIX(machine, "pc-1.") ||
STRPREFIX(machine, "pc-i440") || STRPREFIX(machine, "pc-i440fx-") ||
STRPREFIX(machine, "rhel")); STRPREFIX(machine, "rhel"));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册