mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
qemu: remove pointless condition
This patch is here just to ease the code review and make related changes look more sensible. Apart from removing the condition this is merely a whitespace (indentation) change. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
a53e504052
commit
296a4791eb
@ -8807,32 +8807,30 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
virCommandAddArgBuffer(cmd, &opt);
|
virCommandAddArgBuffer(cmd, &opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def->nserials) {
|
for (i = 0; i < def->nserials; i++) {
|
||||||
for (i = 0; i < def->nserials; i++) {
|
virDomainChrDefPtr serial = def->serials[i];
|
||||||
virDomainChrDefPtr serial = def->serials[i];
|
char *devstr;
|
||||||
char *devstr;
|
|
||||||
|
|
||||||
/* Use -chardev with -device if they are available */
|
/* Use -chardev with -device if they are available */
|
||||||
if (virQEMUCapsSupportsChardev(def, qemuCaps, serial)) {
|
if (virQEMUCapsSupportsChardev(def, qemuCaps, serial)) {
|
||||||
virCommandAddArg(cmd, "-chardev");
|
virCommandAddArg(cmd, "-chardev");
|
||||||
if (!(devstr = qemuBuildChrChardevStr(&serial->source,
|
if (!(devstr = qemuBuildChrChardevStr(&serial->source,
|
||||||
serial->info.alias,
|
serial->info.alias,
|
||||||
qemuCaps)))
|
qemuCaps)))
|
||||||
goto error;
|
goto error;
|
||||||
virCommandAddArg(cmd, devstr);
|
virCommandAddArg(cmd, devstr);
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
|
|
||||||
if (qemuBuildChrDeviceCommandLine(cmd, def, serial, qemuCaps) < 0)
|
if (qemuBuildChrDeviceCommandLine(cmd, def, serial, qemuCaps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
} else {
|
} else {
|
||||||
virCommandAddArg(cmd, "-serial");
|
virCommandAddArg(cmd, "-serial");
|
||||||
if (!(devstr = qemuBuildChrArgStr(&serial->source, NULL)))
|
if (!(devstr = qemuBuildChrArgStr(&serial->source, NULL)))
|
||||||
goto error;
|
goto error;
|
||||||
virCommandAddArg(cmd, devstr);
|
virCommandAddArg(cmd, devstr);
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
}
|
|
||||||
actualSerials++;
|
|
||||||
}
|
}
|
||||||
|
actualSerials++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we have -device, then we set -nodefault already */
|
/* If we have -device, then we set -nodefault already */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user