]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix error for attach controller config for live guest
authorJohn Ferlan <jferlan@redhat.com>
Thu, 7 Jun 2018 00:21:25 +0000 (20:21 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 11 Jun 2018 22:41:33 +0000 (18:41 -0400)
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>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_driver.c

index 28769878cc58f79104e6393bf435e367bd973ccb..fbf1c0622645a8aa5714c12ebdf7011ea2ed3dc8 100644 (file)
@@ -8040,8 +8040,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;
         }