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>
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;
}