mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00:00
qemuDomainDeviceDefPostParse: 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: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
70b36a7b7e
commit
1e501043f7
@ -2562,15 +2562,19 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
||||
virCapsPtr caps,
|
||||
unsigned int parseFlags,
|
||||
void *opaque,
|
||||
void *parseOpaque ATTRIBUTE_UNUSED)
|
||||
void *parseOpaque)
|
||||
{
|
||||
virQEMUDriverPtr driver = opaque;
|
||||
virQEMUCapsPtr qemuCaps = NULL;
|
||||
virQEMUCapsPtr qemuCaps = parseOpaque;
|
||||
virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
|
||||
int ret = -1;
|
||||
|
||||
qemuCaps = virQEMUCapsCacheLookup(caps, driver->qemuCapsCache,
|
||||
def->emulator);
|
||||
if (qemuCaps) {
|
||||
virObjectRef(qemuCaps);
|
||||
} else {
|
||||
qemuCaps = virQEMUCapsCacheLookup(caps, driver->qemuCapsCache,
|
||||
def->emulator);
|
||||
}
|
||||
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_NET &&
|
||||
dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user