qemu: Fix error for attach controller config for live guest

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>
This commit is contained in:
John Ferlan 2018-06-06 20:21:25 -04:00
parent c1aaa253d2
commit 310051c847

View File

@ -8040,8 +8040,9 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
if (controller->idx != -1 && if (controller->idx != -1 &&
virDomainControllerFind(vmdef, controller->type, virDomainControllerFind(vmdef, controller->type,
controller->idx) >= 0) { controller->idx) >= 0) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID,
_("Target already exists")); _("controller index='%d' already exists"),
controller->idx);
return -1; return -1;
} }