提交 81950efa 编写于 作者: D Daniel P. Berrangé

qemu: rename method for getting preferred machine type

The virQEMUCapsGetDefaultMachine() method doesn't get QEMU's default
machine any more, instead it gets the historical default that libvirt
prefers for each arch. Rename it, so that the old name can be used for
getting QEMU's default.
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 b985d1a7
......@@ -4977,7 +4977,7 @@ virQEMUCapsCacheLookupDefault(virFileCachePtr cache,
goto cleanup;
}
} else {
machine = virQEMUCapsGetDefaultMachine(qemuCaps);
machine = virQEMUCapsGetPreferredMachine(qemuCaps);
}
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
......@@ -5036,8 +5036,12 @@ virQEMUCapsIsMachineSupported(virQEMUCapsPtr qemuCaps,
}
/*
* The preferred machine to use if none is listed explicitly
* Note that this may differ from QEMU's own default machine
*/
const char *
virQEMUCapsGetDefaultMachine(virQEMUCapsPtr qemuCaps)
virQEMUCapsGetPreferredMachine(virQEMUCapsPtr qemuCaps)
{
if (!qemuCaps->nmachineTypes)
return NULL;
......
......@@ -606,7 +606,7 @@ bool virQEMUCapsSupportsGICVersion(virQEMUCapsPtr qemuCaps,
bool virQEMUCapsIsMachineSupported(virQEMUCapsPtr qemuCaps,
const char *canonical_machine);
const char *virQEMUCapsGetDefaultMachine(virQEMUCapsPtr qemuCaps);
const char *virQEMUCapsGetPreferredMachine(virQEMUCapsPtr qemuCaps);
int virQEMUCapsInitGuestFromBinary(virCapsPtr caps,
const char *binary,
......
......@@ -168,7 +168,7 @@ fillQemuCaps(virDomainCapsPtr domCaps,
if (!domCaps->machine &&
VIR_STRDUP(domCaps->machine,
virQEMUCapsGetDefaultMachine(qemuCaps)) < 0)
virQEMUCapsGetPreferredMachine(qemuCaps)) < 0)
goto cleanup;
if (virQEMUCapsFillDomainCaps(caps, domCaps, qemuCaps,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册