提交 3d968f40 编写于 作者: M Michal Privoznik

qemuConnectGetDomainCapabilities: Report error on unknown arch

If user hasn't provided any @emulatorbin, the qemuCaps are
searched by @arch provided (which in fact can be guessed from the
host). However, there's no guarantee that the qemu binary for
@arch will exist.  Therefore qemu capabilities may be nonexistent
too. If that's the case, we should throw an error message prior
jumping onto 'cleanup' label as the helper lookup function
remains silent on no search result.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 9318121d
......@@ -16976,8 +16976,12 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
}
} else {
if (!(qemuCaps = virQEMUCapsCacheLookupByArch(driver->qemuCapsCache,
arch)))
arch))) {
virReportError(VIR_ERR_INVALID_ARG,
_("unable to find any emulator to serve '%s' "
"architecture"), virArchToString(arch));
goto cleanup;
}
emulatorbin = virQEMUCapsGetBinary(qemuCaps);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册