Blob Blame History Raw
From 25bfc26066807438fe1f738f6f90100cc5da6e42 Mon Sep 17 00:00:00 2001
Message-Id: <25bfc26066807438fe1f738f6f90100cc5da6e42@dist-git>
From: Pino Toscano <ptoscano@redhat.com>
Date: Wed, 29 Nov 2017 16:22:52 +0100
Subject: [PATCH] qemu: rename QEMU_CAPS_SCLP_S390 to
 QEMU_CAPS_DEVICE_SCLPCONSOLE

Give a better name to the capability for the sclpconsole device.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
(cherry picked from commit 98b55862efb3aad3d96223286f417d1b85921a68)

https://bugzilla.redhat.com/show_bug.cgi?id=1449265
https://bugzilla.redhat.com/show_bug.cgi?id=1511421
https://bugzilla.redhat.com/show_bug.cgi?id=1512929
https://bugzilla.redhat.com/show_bug.cgi?id=1512934
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_capabilities.c | 2 +-
 src/qemu/qemu_capabilities.h | 2 +-
 src/qemu/qemu_command.c      | 4 ++--
 tests/qemuxml2argvtest.c     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 0defa9a3e4..374a2e79a7 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1604,7 +1604,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
     { "ich9-ahci", QEMU_CAPS_ICH9_AHCI },
     { "virtio-blk-s390", QEMU_CAPS_VIRTIO_S390 },
     { "virtio-blk-ccw", QEMU_CAPS_VIRTIO_CCW },
-    { "sclpconsole", QEMU_CAPS_SCLP_S390 },
+    { "sclpconsole", QEMU_CAPS_DEVICE_SCLPCONSOLE },
     { "lsi53c895a", QEMU_CAPS_SCSI_LSI },
     { "virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI },
     { "virtio-scsi-s390", QEMU_CAPS_VIRTIO_SCSI },
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 65b969a0ea..f115738b6b 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -220,7 +220,7 @@ typedef enum {
     QEMU_CAPS_DEVICE_CIRRUS_VGA, /* -device cirrus-vga */
     QEMU_CAPS_DEVICE_VMWARE_SVGA, /* -device vmware-svga */
     QEMU_CAPS_DEVICE_VIDEO_PRIMARY, /* -device safe for primary video device */
-    QEMU_CAPS_SCLP_S390, /* -device sclp* */
+    QEMU_CAPS_DEVICE_SCLPCONSOLE, /* -device sclpconsole */
 
     /* 125 */
     QEMU_CAPS_DEVICE_USB_SERIAL, /* -device usb-serial */
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 65b6a59d3f..092d820b1d 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9420,9 +9420,9 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
         switch (console->targetType) {
         case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
         case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCLP_S390)) {
+            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPCONSOLE)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                               _("sclp console requires QEMU to support s390-sclp"));
+                               _("sclpconsole is not supported in this QEMU binary"));
                 return -1;
             }
 
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 70c72e4e64..747ad24663 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1333,7 +1333,7 @@ mymain(void)
     DO_TEST("console-sclp",
             QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_VIRTIO_S390,
-            QEMU_CAPS_SCLP_S390);
+            QEMU_CAPS_DEVICE_SCLPCONSOLE);
     DO_TEST("channel-spicevmc",
             QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_SPICE,
-- 
2.15.1