提交 4172ae37 编写于 作者: M Michal Privoznik

qemuDomainDefAssignAddresses: Fetch caps from domain object

Just like we did two commits ago, don't try to fetch capabilities
for non-existing binary. Re-use the ones we have for running
domain.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 1e501043
......@@ -2774,17 +2774,21 @@ qemuDomainDefAssignAddresses(virDomainDef *def,
virCapsPtr caps,
unsigned int parseFlags ATTRIBUTE_UNUSED,
void *opaque,
void *parseOpaque ATTRIBUTE_UNUSED)
void *parseOpaque)
{
virQEMUDriverPtr driver = opaque;
virQEMUCapsPtr qemuCaps = NULL;
virQEMUCapsPtr qemuCaps = parseOpaque;
int ret = -1;
bool newDomain = parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
if (!(qemuCaps = virQEMUCapsCacheLookup(caps,
driver->qemuCapsCache,
def->emulator)))
goto cleanup;
if (qemuCaps) {
virObjectRef(qemuCaps);
} else {
if (!(qemuCaps = virQEMUCapsCacheLookup(caps,
driver->qemuCapsCache,
def->emulator)))
goto cleanup;
}
if (qemuDomainAssignAddresses(def, qemuCaps, NULL, newDomain) < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册