If openvzDomainLookupByID or openvzDomainLookupByName fails to find a vm, let's be a bit more descriptive by providing the failing id or name in the error message. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/openvz/openvz_driver.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 167ba2f7a..b31bf0714 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -351,7 +351,8 @@ static virDomainPtr openvzDomainLookupByID(virConnectPtr conn, openvzDriverUnlock(driver); if (!vm) { - virReportError(VIR_ERR_NO_DOMAIN, NULL); + virReportError(VIR_ERR_NO_DOMAIN, + _("no domain with matching id '%d'"), id); goto cleanup; } @@ -425,7 +426,8 @@ static virDomainPtr openvzDomainLookupByName(virConnectPtr conn, openvzDriverUnlock(driver); if (!vm) { - virReportError(VIR_ERR_NO_DOMAIN, NULL); + virReportError(VIR_ERR_NO_DOMAIN, + _("no domain with matching name '%s'"), name); goto cleanup; } @@ -1113,8 +1115,8 @@ openvzDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) openvzDriverUnlock(driver); if (!vm) { - virReportError(VIR_ERR_NO_DOMAIN, "%s", - _("no domain with matching id")); + virReportError(VIR_ERR_NO_DOMAIN, + _("no domain with matching name '%s'"), dom->name); goto cleanup; } -- 2.13.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list