提交 f3699636 编写于 作者: A Andrea Bolognani

qemu: Ignore subsequent attempts to probe device properties

In some cases, we are probing multiple devices for the same
property and setting the corresponding capability if it's
found on any of the devices: when that happens, we can quit
early after finding the first property and avoiding a bunch
of string comparisons.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
上级 a68ba683
......@@ -1978,6 +1978,9 @@ virQEMUCapsProcessStringFlags(virQEMUCapsPtr qemuCaps,
{
size_t i, j;
for (i = 0; i < nflags; i++) {
if (virQEMUCapsGet(qemuCaps, flags[i].flag))
continue;
for (j = 0; j < nvalues; j++) {
if (STREQ(values[j], flags[i].value)) {
virQEMUCapsSet(qemuCaps, flags[i].flag);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册