render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
3e5111
From ec386f59f68c4e66bb41f293f8c7f4e023cae9e0 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <ec386f59f68c4e66bb41f293f8c7f4e023cae9e0@dist-git>
3e5111
From: Erik Skultety <eskultet@redhat.com>
3e5111
Date: Thu, 11 May 2017 17:05:24 +0200
3e5111
Subject: [PATCH] qemu: Provide a much clearer message on device hot-plug
3e5111
3e5111
Adjust the current message to make it clear, that it is the hotplug
3e5111
operation that is unsupported with the given host device type.
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1450072
3e5111
3e5111
Signed-off-by: Erik Skultety <eskultet@redhat.com>
3e5111
(cherry picked from commit f4829df9aeb54d246ee9a816921a78e268ba7701)
3e5111
Signed-off-by: Erik Skultety <eskultet@redhat.com>
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/qemu/qemu_hotplug.c | 8 ++++----
3e5111
 1 file changed, 4 insertions(+), 4 deletions(-)
3e5111
3e5111
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
3e5111
index 120bcdc62..6e5678f16 100644
3e5111
--- a/src/qemu/qemu_hotplug.c
3e5111
+++ b/src/qemu/qemu_hotplug.c
3e5111
@@ -2694,7 +2694,7 @@ qemuDomainAttachHostDevice(virConnectPtr conn,
3e5111
 {
3e5111
     if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
3e5111
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
3e5111
-                       _("hostdev mode '%s' not supported"),
3e5111
+                       _("hotplug is not supported for hostdev mode '%s'"),
3e5111
                        virDomainHostdevModeTypeToString(hostdev->mode));
3e5111
         return -1;
3e5111
     }
3e5111
@@ -2725,7 +2725,7 @@ qemuDomainAttachHostDevice(virConnectPtr conn,
3e5111
 
3e5111
     default:
3e5111
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
3e5111
-                       _("hostdev subsys type '%s' not supported"),
3e5111
+                       _("hotplug is not supported for hostdev subsys type '%s'"),
3e5111
                        virDomainHostdevSubsysTypeToString(hostdev->source.subsys.type));
3e5111
         goto error;
3e5111
     }
3e5111
@@ -4840,7 +4840,7 @@ qemuDomainDetachThisHostDevice(virQEMUDriverPtr driver,
3e5111
         break;
3e5111
     default:
3e5111
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
3e5111
-                       _("hostdev subsys type '%s' not supported"),
3e5111
+                       _("hot unplug is not supported for hostdev subsys type '%s'"),
3e5111
                        virDomainHostdevSubsysTypeToString(detach->source.subsys.type));
3e5111
         return -1;
3e5111
     }
3e5111
@@ -4872,7 +4872,7 @@ int qemuDomainDetachHostDevice(virQEMUDriverPtr driver,
3e5111
 
3e5111
     if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
3e5111
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
3e5111
-                       _("hostdev mode '%s' not supported"),
3e5111
+                       _("hot unplug is not supported for hostdev mode '%s'"),
3e5111
                        virDomainHostdevModeTypeToString(hostdev->mode));
3e5111
         return -1;
3e5111
     }
3e5111
-- 
3e5111
2.13.0
3e5111