提交 a74e7270 编写于 作者: J Ján Tomko

qemuBuildShmemCommandLine: add chardev variable

That way devstr will only be used for the device string.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 d804bde8
......@@ -9145,6 +9145,7 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager,
VIR_AUTOPTR(virJSONValue) memProps = NULL;
VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
char *devstr = NULL;
VIR_AUTOFREE(char *) chardev = NULL;
int rc;
unsigned int cdevflags = QEMU_BUILD_CHARDEV_TCP_NOWAIT |
QEMU_BUILD_CHARDEV_UNIX_FD_PASS;
......@@ -9215,16 +9216,15 @@ qemuBuildShmemCommandLine(virLogManagerPtr logManager,
VIR_FREE(devstr);
if (shmem->server.enabled) {
devstr = qemuBuildChrChardevStr(logManager, secManager,
chardev = qemuBuildChrChardevStr(logManager, secManager,
cmd, cfg, def,
&shmem->server.chr,
shmem->info.alias, qemuCaps,
cdevflags);
if (!devstr)
if (!chardev)
return -1;
virCommandAddArgList(cmd, "-chardev", devstr, NULL);
VIR_FREE(devstr);
virCommandAddArgList(cmd, "-chardev", chardev, NULL);
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册