mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: Move device alias assigning before command line construction
This patch is rather cosmetic as it only moves device alias assignation from command line construction just before that. However, it is needed in connotation of previous and next patch.
This commit is contained in:
parent
458b7099b2
commit
b8fbe5d5ba
@ -656,7 +656,7 @@ qemuAssignDeviceControllerAlias(virDomainControllerDefPtr controller)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
int
|
||||
qemuAssignDeviceAliases(virDomainDefPtr def, virBitmapPtr qemuCaps)
|
||||
{
|
||||
int i;
|
||||
@ -3284,9 +3284,6 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
bool usblegacy = false;
|
||||
uname_normalize(&ut);
|
||||
|
||||
if (qemuAssignDeviceAliases(def, qemuCaps) < 0)
|
||||
return NULL;
|
||||
|
||||
virUUIDFormat(def->uuid, uuid);
|
||||
|
||||
emulator = def->emulator;
|
||||
|
@ -187,6 +187,7 @@ int qemuDomainPCIAddressReleaseSlot(qemuDomainPCIAddressSetPtr addrs, int slot);
|
||||
void qemuDomainPCIAddressSetFree(qemuDomainPCIAddressSetPtr addrs);
|
||||
int qemuAssignDevicePCISlots(virDomainDefPtr def, qemuDomainPCIAddressSetPtr addrs);
|
||||
|
||||
int qemuAssignDeviceAliases(virDomainDefPtr def, virBitmapPtr qemuCaps);
|
||||
int qemuDomainNetVLAN(virDomainNetDefPtr def);
|
||||
int qemuAssignDeviceNetAlias(virDomainDefPtr def, virDomainNetDefPtr net, int idx);
|
||||
int qemuAssignDeviceDiskAlias(virDomainDiskDefPtr def, virBitmapPtr qemuCaps);
|
||||
|
@ -4621,6 +4621,9 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
|
||||
if (qemuProcessPrepareMonitorChr(driver, &monConfig, def->name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuAssignDeviceAliases(def, qemuCaps) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(cmd = qemuBuildCommandLine(conn, driver, def,
|
||||
&monConfig, monitor_json, qemuCaps,
|
||||
NULL, -1, NULL, VIR_VM_OP_NO_OP)))
|
||||
|
@ -3015,6 +3015,9 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
priv->persistentAddrs = 0;
|
||||
}
|
||||
|
||||
if (qemuAssignDeviceAliases(vm->def, priv->qemuCaps) < 0)
|
||||
goto cleanup;
|
||||
|
||||
VIR_DEBUG("Building emulator command line");
|
||||
if (!(cmd = qemuBuildCommandLine(conn, driver, vm->def, priv->monConfig,
|
||||
priv->monJSON != 0, priv->qemuCaps,
|
||||
|
@ -118,6 +118,9 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
qemuCapsSet(extraFlags, QEMU_CAPS_PCI_MULTIBUS);
|
||||
}
|
||||
|
||||
if (qemuAssignDeviceAliases(vmdef, extraFlags) < 0)
|
||||
goto fail;
|
||||
|
||||
if (!(cmd = qemuBuildCommandLine(conn, &driver,
|
||||
vmdef, &monitor_chr, json, extraFlags,
|
||||
migrateFrom, migrateFd, NULL,
|
||||
|
@ -118,6 +118,9 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
qemuCapsSet(extraFlags, QEMU_CAPS_PCI_MULTIBUS);
|
||||
}
|
||||
|
||||
if (qemuAssignDeviceAliases(vmdef, extraFlags) < 0)
|
||||
goto fail;
|
||||
|
||||
if (!(cmd = qemuBuildCommandLine(conn, &driver,
|
||||
vmdef, &monitor_chr, json, extraFlags,
|
||||
migrateFrom, migrateFd, NULL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user