]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't overwrite useful message when creating macvlan fails
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 13 May 2013 16:32:55 +0000 (17:32 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 13 May 2013 16:32:55 +0000 (17:32 +0100)
Currently we report a bogus error message when macvlan
creation fails:

error: Failed to start domain migtest
error: operation failed: Unable to create macvlan device

With this removed, we see the real error:

error: Failed to start domain migtest
error: Unable to get index for interface p31p1: No such device

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/virnetdevmacvlan.c

index 0c4fcbdd79b1a40bfa1bc2daff72305493c7bb8e..53165200225de65b9fc503f0bc20b8b6251d8ecf 100644 (file)
@@ -897,11 +897,8 @@ create_name:
         }
 
         virMutexUnlock(&virNetDevMacVLanCreateMutex);
-        if (!cr_ifname) {
-            virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                           _("Unable to create macvlan device"));
+        if (!cr_ifname)
             return -1;
-        }
     }
 
     if (virNetDevVPortProfileAssociate(cr_ifname,