mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Move assignment of default emulator to the basic post parse callback
This commit is contained in:
parent
2f19c9325e
commit
03132bf487
@ -2924,9 +2924,23 @@ qemuDomainDefVerifyFeatures(const virDomainDef *def)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainDefPostParseBasic(virDomainDefPtr def,
|
||||
virCapsPtr caps,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* check for emulator and create a default one if needed */
|
||||
if (!def->emulator &&
|
||||
!(def->emulator = virDomainDefGetDefaultEmulator(def, caps)))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainDefPostParse(virDomainDefPtr def,
|
||||
virCapsPtr caps,
|
||||
virCapsPtr caps ATTRIBUTE_UNUSED,
|
||||
unsigned int parseFlags,
|
||||
void *opaque,
|
||||
void *parseOpaque)
|
||||
@ -2957,11 +2971,6 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* check for emulator and create a default one if needed */
|
||||
if (!def->emulator &&
|
||||
!(def->emulator = virDomainDefGetDefaultEmulator(def, caps)))
|
||||
goto cleanup;
|
||||
|
||||
if (qemuCaps) {
|
||||
virObjectRef(qemuCaps);
|
||||
} else {
|
||||
@ -3716,6 +3725,7 @@ qemuDomainDefAssignAddresses(virDomainDef *def,
|
||||
|
||||
|
||||
virDomainDefParserConfig virQEMUDriverDomainDefParserConfig = {
|
||||
.domainPostParseBasicCallback = qemuDomainDefPostParseBasic,
|
||||
.devicesPostParseCallback = qemuDomainDeviceDefPostParse,
|
||||
.domainPostParseCallback = qemuDomainDefPostParse,
|
||||
.assignAddressesCallback = qemuDomainDefAssignAddresses,
|
||||
|
Loading…
x
Reference in New Issue
Block a user