提交 d52e6043 编写于 作者: M Michal Privoznik

qemu: Set alias for memory cell in qemuBuildMemoryCellBackendStr

Very soon qemuBuildMemoryBackendStr() is going to use memory cell
aliases. Therefore set one. At the same time, move it a bit
further - if virAsprintf() fails, there's no point in setting
rest of the members.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 ef7e6ee2
......@@ -3486,12 +3486,13 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
cell);
if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
goto cleanup;
*backendStr = NULL;
mem.size = memsize;
mem.targetNode = cell;
if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
goto cleanup;
mem.info.alias = alias;
if ((rc = qemuBuildMemoryBackendStr(&props, &backendType, cfg, priv->qemuCaps,
def, &mem, priv->autoNodeset, false)) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册