Blame SOURCES/libvirt-qemu-rename-QEMU_CAPS_SCLP_S390-to-QEMU_CAPS_DEVICE_SCLPCONSOLE.patch

c1c534
From 25bfc26066807438fe1f738f6f90100cc5da6e42 Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <25bfc26066807438fe1f738f6f90100cc5da6e42@dist-git>
c1c534
From: Pino Toscano <ptoscano@redhat.com>
c1c534
Date: Wed, 29 Nov 2017 16:22:52 +0100
c1c534
Subject: [PATCH] qemu: rename QEMU_CAPS_SCLP_S390 to
c1c534
 QEMU_CAPS_DEVICE_SCLPCONSOLE
c1c534
c1c534
Give a better name to the capability for the sclpconsole device.
c1c534
c1c534
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
c1c534
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
c1c534
(cherry picked from commit 98b55862efb3aad3d96223286f417d1b85921a68)
c1c534
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1449265
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1511421
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1512929
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1512934
c1c534
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c1c534
---
c1c534
 src/qemu/qemu_capabilities.c | 2 +-
c1c534
 src/qemu/qemu_capabilities.h | 2 +-
c1c534
 src/qemu/qemu_command.c      | 4 ++--
c1c534
 tests/qemuxml2argvtest.c     | 2 +-
c1c534
 4 files changed, 5 insertions(+), 5 deletions(-)
c1c534
c1c534
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
c1c534
index 0defa9a3e4..374a2e79a7 100644
c1c534
--- a/src/qemu/qemu_capabilities.c
c1c534
+++ b/src/qemu/qemu_capabilities.c
c1c534
@@ -1604,7 +1604,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
c1c534
     { "ich9-ahci", QEMU_CAPS_ICH9_AHCI },
c1c534
     { "virtio-blk-s390", QEMU_CAPS_VIRTIO_S390 },
c1c534
     { "virtio-blk-ccw", QEMU_CAPS_VIRTIO_CCW },
c1c534
-    { "sclpconsole", QEMU_CAPS_SCLP_S390 },
c1c534
+    { "sclpconsole", QEMU_CAPS_DEVICE_SCLPCONSOLE },
c1c534
     { "lsi53c895a", QEMU_CAPS_SCSI_LSI },
c1c534
     { "virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI },
c1c534
     { "virtio-scsi-s390", QEMU_CAPS_VIRTIO_SCSI },
c1c534
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
c1c534
index 65b969a0ea..f115738b6b 100644
c1c534
--- a/src/qemu/qemu_capabilities.h
c1c534
+++ b/src/qemu/qemu_capabilities.h
c1c534
@@ -220,7 +220,7 @@ typedef enum {
c1c534
     QEMU_CAPS_DEVICE_CIRRUS_VGA, /* -device cirrus-vga */
c1c534
     QEMU_CAPS_DEVICE_VMWARE_SVGA, /* -device vmware-svga */
c1c534
     QEMU_CAPS_DEVICE_VIDEO_PRIMARY, /* -device safe for primary video device */
c1c534
-    QEMU_CAPS_SCLP_S390, /* -device sclp* */
c1c534
+    QEMU_CAPS_DEVICE_SCLPCONSOLE, /* -device sclpconsole */
c1c534
 
c1c534
     /* 125 */
c1c534
     QEMU_CAPS_DEVICE_USB_SERIAL, /* -device usb-serial */
c1c534
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
c1c534
index 65b6a59d3f..092d820b1d 100644
c1c534
--- a/src/qemu/qemu_command.c
c1c534
+++ b/src/qemu/qemu_command.c
c1c534
@@ -9420,9 +9420,9 @@ qemuBuildConsoleCommandLine(virLogManagerPtr logManager,
c1c534
         switch (console->targetType) {
c1c534
         case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLP:
c1c534
         case VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SCLPLM:
c1c534
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCLP_S390)) {
c1c534
+            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_SCLPCONSOLE)) {
c1c534
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
c1c534
-                               _("sclp console requires QEMU to support s390-sclp"));
c1c534
+                               _("sclpconsole is not supported in this QEMU binary"));
c1c534
                 return -1;
c1c534
             }
c1c534
 
c1c534
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
c1c534
index 70c72e4e64..747ad24663 100644
c1c534
--- a/tests/qemuxml2argvtest.c
c1c534
+++ b/tests/qemuxml2argvtest.c
c1c534
@@ -1333,7 +1333,7 @@ mymain(void)
c1c534
     DO_TEST("console-sclp",
c1c534
             QEMU_CAPS_NODEFCONFIG,
c1c534
             QEMU_CAPS_VIRTIO_S390,
c1c534
-            QEMU_CAPS_SCLP_S390);
c1c534
+            QEMU_CAPS_DEVICE_SCLPCONSOLE);
c1c534
     DO_TEST("channel-spicevmc",
c1c534
             QEMU_CAPS_NODEFCONFIG,
c1c534
             QEMU_CAPS_SPICE,
c1c534
-- 
c1c534
2.15.1
c1c534