From: John Ferlan Date: Thu, 7 Jun 2018 00:21:25 +0000 (-0400) Subject: qemu: Fix error for attach controller config for live guest X-Git-Tag: v4.5.0-rc1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=310051c8478d52e060dcd9c4ae0b5ce954ee9fdb;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 28769878cc..fbf1c06226 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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; }