@@ -10403,38 +10403,28 @@ qemuBuildCommandLine(virConnectPtr conn,
actualSerials++;
}
- /* If we have -device, then we set -nodefault already */
- if (!actualSerials && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
- virCommandAddArgList(cmd, "-serial", "none", NULL);
-
- if (!def->nparallels) {
- /* If we have -device, then we set -nodefault already */
- if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
- virCommandAddArgList(cmd, "-parallel", "none", NULL);
- } else {
- for (i = 0; i < def->nparallels; i++) {
- virDomainChrDefPtr parallel = def->parallels[i];
- char *devstr;
+ for (i = 0; i < def->nparallels; i++) {
+ virDomainChrDefPtr parallel = def->parallels[i];
+ char *devstr;
- /* Use -chardev with -device if they are available */
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV)) {
- virCommandAddArg(cmd, "-chardev");
- if (!(devstr = qemuBuildChrChardevStr(¶llel->source,
- parallel->info.alias,
- qemuCaps)))
- goto error;
- virCommandAddArg(cmd, devstr);
- VIR_FREE(devstr);
+ /* Use -chardev with -device if they are available */
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV)) {
+ virCommandAddArg(cmd, "-chardev");
+ if (!(devstr = qemuBuildChrChardevStr(¶llel->source,
+ parallel->info.alias,
+ qemuCaps)))
+ goto error;
+ virCommandAddArg(cmd, devstr);
+ VIR_FREE(devstr);
- if (qemuBuildChrDeviceCommandLine(cmd, def, parallel, qemuCaps) < 0)
- goto error;
- } else {
- virCommandAddArg(cmd, "-parallel");
- if (!(devstr = qemuBuildChrArgStr(¶llel->source, NULL)))
- goto error;
- virCommandAddArg(cmd, devstr);
- VIR_FREE(devstr);
- }
+ if (qemuBuildChrDeviceCommandLine(cmd, def, parallel, qemuCaps) < 0)
+ goto error;
+ } else {
+ virCommandAddArg(cmd, "-parallel");
+ if (!(devstr = qemuBuildChrArgStr(¶llel->source, NULL)))
+ goto error;
+ virCommandAddArg(cmd, devstr);
+ VIR_FREE(devstr);
}
}