提交 5f12b844 编写于 作者: M Martin Kletzander

qemu: Move memory size detection to the top of the function

To get rid of very long line and make it more readable.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 04b57b4a
...@@ -5249,17 +5249,17 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def, ...@@ -5249,17 +5249,17 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
const char *backendType; const char *backendType;
int ret = -1; int ret = -1;
int rc; int rc;
unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
cell);
*backendStr = NULL; *backendStr = NULL;
if (virAsprintf(&alias, "ram-node%zu", cell) < 0) if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
goto cleanup; goto cleanup;
if ((rc = qemuBuildMemoryBackendStr(virDomainNumaGetNodeMemorySize(def->numa, cell), if ((rc = qemuBuildMemoryBackendStr(memsize, 0, cell, NULL, auto_nodeset,
0, cell, def, qemuCaps, cfg, &backendType,
NULL, auto_nodeset, &props, false)) < 0)
def, qemuCaps, cfg,
&backendType, &props, false)) < 0)
goto cleanup; goto cleanup;
if (!(*backendStr = qemuBuildObjectCommandlineFromJSON(backendType, if (!(*backendStr = qemuBuildObjectCommandlineFromJSON(backendType,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册