[libvirt] [PATCH 1/2] qemu: Fix error for attach controller config for live guest

John Ferlan posted 2 patches 6 years, 11 months ago
[libvirt] [PATCH 1/2] qemu: Fix error for attach controller config for live guest
Posted by John Ferlan 6 years, 11 months ago
Fix the error message to indicate what exactly is failing - that
the controller index provided matches an existing controller.

Signed-off-by: John Ferlan <jferlan@redhat.com>
---
 src/qemu/qemu_driver.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 38ea865ce3..50a7de4598 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8039,8 +8039,9 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
         if (controller->idx != -1 &&
             virDomainControllerFind(vmdef, controller->type,
                                     controller->idx) >= 0) {
-            virReportError(VIR_ERR_OPERATION_INVALID, "%s",
-                           _("Target already exists"));
+            virReportError(VIR_ERR_OPERATION_INVALID,
+                           _("controller index='%d' already exists"),
+                           controller->idx);
             return -1;
         }
 
-- 
2.14.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] qemu: Fix error for attach controller config for live guest
Posted by Ján Tomko 6 years, 11 months ago
On Wed, Jun 06, 2018 at 08:21:25PM -0400, John Ferlan wrote:
>Fix the error message to indicate what exactly is failing - that
>the controller index provided matches an existing controller.
>
>Signed-off-by: John Ferlan <jferlan@redhat.com>
>---
> src/qemu/qemu_driver.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list