The whole block was also conditionalized on nvideos >= 1, which the
loop will handle fine after the QEMU_CAPS_DEVICE check is dropped.
---
src/qemu/qemu_command.c | 35 +++++++++++++----------------------
1 file changed, 13 insertions(+), 22 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 516f351..d48f173 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10706,33 +10706,24 @@ qemuBuildCommandLine(virConnectPtr conn,
dev, vram / 1024);
}
- if (def->nvideos > 1) {
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
- for (i = 1; i < def->nvideos; i++) {
- char *str;
- if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("video type %s is only valid as primary
video card"),
-
virDomainVideoTypeToString(def->videos[0]->type));
- goto error;
- }
-
- virCommandAddArg(cmd, "-device");
-
- if (!(str = qemuBuildDeviceVideoStr(def, def->videos[i],
qemuCaps, false)))
- goto error;
-
- virCommandAddArg(cmd, str);
- VIR_FREE(str);
- }
- } else {
+ for (i = 1; i < def->nvideos; i++) {
+ char *str;
+ if (def->videos[i]->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- "%s", _("only one video card is
currently supported"));
+ _("video type %s is only valid as primary video
card"),
+
virDomainVideoTypeToString(def->videos[0]->type));
goto error;
}
+
+ virCommandAddArg(cmd, "-device");
+
+ if (!(str = qemuBuildDeviceVideoStr(def, def->videos[i], qemuCaps,
false)))
+ goto error;
+
+ virCommandAddArg(cmd, str);
+ VIR_FREE(str);
}
}
-
}
/* Add sound hardware */
--
2.5.0