]> xenbits.xensource.com Git - libvirt.git/commitdiff
uml: Add more specific error message on failed FindBy call
authorJohn Ferlan <jferlan@redhat.com>
Fri, 9 Mar 2018 14:33:26 +0000 (09:33 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 19 Apr 2018 18:44:46 +0000 (14:44 -0400)
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 <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/uml/uml_driver.c

index fd19cfbf4dfd1e53a760500bb4a74d60f9fd0e52..644e02b2917eeec692dacb113d2d2647807fca6d 100644 (file)
@@ -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;
     }