[PATCH] Don't overwrite useful message when creating macvlan fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 src/util/virnetdevmacvlan.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index 0c4fcbd..5316520 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -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,
-- 
1.8.2.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]