mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-12 22:51:29 +00:00
qemu: command: Split up formatting of -numa and memory devices
They recently were extracted to a separate function. They don't belong together though. Since -numa formatting is pretty compact, move it to the main function and rename qemuBuildNumaCommandLine to qemuBuildMemoryDeviceCommandLine.
This commit is contained in:
parent
25c39f76b8
commit
13a4ec678f
@ -7182,7 +7182,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuBuildNumaCommandLine(virCommandPtr cmd,
|
qemuBuildMemoryDeviceCommandLine(virCommandPtr cmd,
|
||||||
virQEMUDriverConfigPtr cfg,
|
virQEMUDriverConfigPtr cfg,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
virQEMUCapsPtr qemuCaps,
|
virQEMUCapsPtr qemuCaps,
|
||||||
@ -7190,10 +7190,6 @@ qemuBuildNumaCommandLine(virCommandPtr cmd,
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (virDomainNumaGetNodeCount(def->numa) &&
|
|
||||||
qemuBuildNumaArgStr(cfg, def, cmd, qemuCaps, nodeset) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* memory hotplug requires NUMA to be enabled - we already checked
|
/* memory hotplug requires NUMA to be enabled - we already checked
|
||||||
* that memory devices are present only when NUMA is */
|
* that memory devices are present only when NUMA is */
|
||||||
for (i = 0; i < def->nmems; i++) {
|
for (i = 0; i < def->nmems; i++) {
|
||||||
@ -9260,7 +9256,11 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
if (qemuBuildIOThreadCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildIOThreadCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (qemuBuildNumaCommandLine(cmd, cfg, def, qemuCaps, nodeset) < 0)
|
if (virDomainNumaGetNodeCount(def->numa) &&
|
||||||
|
qemuBuildNumaArgStr(cfg, def, cmd, qemuCaps, nodeset) < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
if (qemuBuildMemoryDeviceCommandLine(cmd, cfg, def, qemuCaps, nodeset) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
virUUIDFormat(def->uuid, uuid);
|
virUUIDFormat(def->uuid, uuid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user