mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemuBuildConsoleCommandLine: Remove identical code
Unify the cases for SCLP/SCLPLM/VIRTIO consoles as the code is identical. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
850a7311b8
commit
dc3f025617
@ -9513,35 +9513,7 @@ qemuBuildConsoleCommandLine(virCommand *cmd,
|
||||
|
||||
switch (console->targetType) {
|
||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
|
||||
if (!(devstr = qemuBuildChrChardevStr(cmd,
|
||||
cfg,
|
||||
console->source,
|
||||
console->info.alias,
|
||||
qemuCaps)))
|
||||
return -1;
|
||||
virCommandAddArg(cmd, "-chardev");
|
||||
virCommandAddArg(cmd, devstr);
|
||||
VIR_FREE(devstr);
|
||||
|
||||
if (qemuBuildChrDeviceCommandLine(cmd, def, console, qemuCaps) < 0)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
|
||||
if (!(devstr = qemuBuildChrChardevStr(cmd,
|
||||
cfg,
|
||||
console->source,
|
||||
console->info.alias,
|
||||
qemuCaps)))
|
||||
return -1;
|
||||
virCommandAddArg(cmd, "-chardev");
|
||||
virCommandAddArg(cmd, devstr);
|
||||
VIR_FREE(devstr);
|
||||
|
||||
if (qemuBuildChrDeviceCommandLine(cmd, def, console, qemuCaps) < 0)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO:
|
||||
if (!(devstr = qemuBuildChrChardevStr(cmd,
|
||||
cfg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user