render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
6d3351
From 50f1f290f3a0ea5a025d6a2a33f96c8b05d8b13a Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <50f1f290f3a0ea5a025d6a2a33f96c8b05d8b13a@dist-git>
6d3351
From: Cole Robinson <crobinso@redhat.com>
6d3351
Date: Tue, 11 Jul 2017 10:57:42 +0200
6d3351
Subject: [PATCH] qemu: command: Drop some QEMU_CAPS_CHARDEV checks
6d3351
6d3351
AFAIK there aren't any cases where we should fail these checks with
6d3351
supported qemu versions, so just drop them.
6d3351
6d3351
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6d3351
Signed-off-by: Cole Robinson <crobinso@redhat.com>
6d3351
(cherry picked from commit 8fc7cf6aa88266fb218bbff4f65d6b377e9bc91d)
6d3351
6d3351
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1435681
6d3351
6d3351
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/qemu/qemu_command.c | 15 +++------------
6d3351
 1 file changed, 3 insertions(+), 12 deletions(-)
6d3351
6d3351
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
6d3351
index f3a9466083..5c2607fe41 100644
6d3351
--- a/src/qemu/qemu_command.c
6d3351
+++ b/src/qemu/qemu_command.c
6d3351
@@ -8847,8 +8847,7 @@ qemuBuildSmartcardCommandLine(virLogManagerPtr logManager,
6d3351
 
6d3351
     switch (smartcard->type) {
6d3351
     case VIR_DOMAIN_SMARTCARD_TYPE_HOST:
6d3351
-        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV) ||
6d3351
-            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCID_EMULATED)) {
6d3351
+        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCID_EMULATED)) {
6d3351
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
6d3351
                            _("this QEMU binary lacks smartcard host "
6d3351
                              "mode support"));
6d3351
@@ -8859,8 +8858,7 @@ qemuBuildSmartcardCommandLine(virLogManagerPtr logManager,
6d3351
         break;
6d3351
 
6d3351
     case VIR_DOMAIN_SMARTCARD_TYPE_HOST_CERTIFICATES:
6d3351
-        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV) ||
6d3351
-            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCID_EMULATED)) {
6d3351
+        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCID_EMULATED)) {
6d3351
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
6d3351
                            _("this QEMU binary lacks smartcard host "
6d3351
                              "mode support"));
6d3351
@@ -8895,8 +8893,7 @@ qemuBuildSmartcardCommandLine(virLogManagerPtr logManager,
6d3351
         break;
6d3351
 
6d3351
     case VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH:
6d3351
-        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV) ||
6d3351
-            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCID_PASSTHRU)) {
6d3351
+        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CCID_PASSTHRU)) {
6d3351
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
6d3351
                            _("this QEMU binary lacks smartcard "
6d3351
                              "passthrough mode support"));
6d3351
@@ -9276,12 +9273,6 @@ qemuBuildChannelsCommandLine(virLogManagerPtr logManager,
6d3351
 
6d3351
         switch (channel->targetType) {
6d3351
         case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD:
6d3351
-            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CHARDEV)) {
6d3351
-                virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
6d3351
-                               "%s", _("guestfwd requires QEMU to support -chardev & -device"));
6d3351
-                return -1;
6d3351
-            }
6d3351
-
6d3351
             if (!(devstr = qemuBuildChrChardevStr(logManager, cmd, cfg, def,
6d3351
                                                   channel->source,
6d3351
                                                   channel->info.alias,
6d3351
-- 
6d3351
2.13.3
6d3351