[PATCH v1 01/31] networkLookupByUUID: Improve error message

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

 



We have this function networkObjFromNetwork() which for given
virNetworkPtr tries to find corresponding virNetworkObjPtr. If no
object is found, a nice error message is printed out:

  no network with matching uuid '$uuid' ($name)

Let's improve the error message produced by networkLookupByUUID to
follow that logic.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/network/bridge_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 1209609..522ccc2 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -2475,7 +2475,8 @@ static virNetworkPtr networkLookupByUUID(virConnectPtr conn,
     networkDriverUnlock();
     if (!network) {
         virReportError(VIR_ERR_NO_NETWORK,
-                       "%s", _("no network with matching uuid"));
+                       _("no network with matching uuid '%s'"),
+                       uuid);
         goto cleanup;
     }
 
-- 
2.0.5

--
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]