From: John Ferlan Date: Fri, 9 Mar 2018 14:33:26 +0000 (-0500) Subject: uml: Add more specific error message on failed FindBy call X-Git-Tag: v4.3.0-rc1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e134bd377cac4c0213bfb75e7aef0accf2b371f;p=thirdparty%2Flibvirt.git uml: Add more specific error message on failed FindBy call Rather than an empty failed to find, let's provide a bit more knowledge about what we failed to find by using the name string or the id value. Signed-off-by: John Ferlan Reviewed-by: Daniel P. Berrangé --- diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index fd19cfbf4d..644e02b291 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -1385,7 +1385,8 @@ static virDomainPtr umlDomainLookupByID(virConnectPtr conn, umlDriverUnlock(driver); if (!vm) { - virReportError(VIR_ERR_NO_DOMAIN, NULL); + virReportError(VIR_ERR_NO_DOMAIN, + _("no domain with matching id '%d'"), id); goto cleanup; } @@ -1433,7 +1434,8 @@ static virDomainPtr umlDomainLookupByName(virConnectPtr conn, umlDriverUnlock(driver); if (!vm) { - virReportError(VIR_ERR_NO_DOMAIN, NULL); + virReportError(VIR_ERR_NO_DOMAIN, + _("no domain with matching name '%s'"), name); goto cleanup; }