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

Re: [Libvir] [PATCH] virNetworkLookup* functions should raise VIR_ERR_NO_NETWORK



Second version attached which fixes s/domain/network/.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
diff -uprN --exclude=CVS --exclude=.git --exclude='*.pem' --exclude=demoCA --exclude=.gitignore --exclude='*.orig' --exclude='*.bak' libvirt-domain-lookup-2/src/libvirt.c libvirt-network-lookup/src/libvirt.c
--- libvirt-domain-lookup-2/src/libvirt.c	2007-07-03 12:44:09.000000000 +0100
+++ libvirt-network-lookup/src/libvirt.c	2007-07-04 10:37:45.000000000 +0100
@@ -2330,7 +2330,8 @@ virConnectListDefinedNetworks(virConnect
  *
  * Try to lookup a network on the given hypervisor based on its name.
  *
- * Returns a new network object or NULL in case of failure
+ * Returns a new network object or NULL in case of failure.  If the
+ * network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
  */
 virNetworkPtr
 virNetworkLookupByName(virConnectPtr conn, const char *name)
@@ -2358,7 +2359,8 @@ virNetworkLookupByName(virConnectPtr con
  *
  * Try to lookup a network on the given hypervisor based on its UUID.
  *
- * Returns a new network object or NULL in case of failure
+ * Returns a new network object or NULL in case of failure.  If the
+ * network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
  */
 virNetworkPtr
 virNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
@@ -2386,7 +2388,8 @@ virNetworkLookupByUUID(virConnectPtr con
  *
  * Try to lookup a network on the given hypervisor based on its UUID.
  *
- * Returns a new network object or NULL in case of failure
+ * Returns a new network object or NULL in case of failure.  If the
+ * network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
  */
 virNetworkPtr
 virNetworkLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
diff -uprN --exclude=CVS --exclude=.git --exclude='*.pem' --exclude=demoCA --exclude=.gitignore --exclude='*.orig' --exclude='*.bak' libvirt-domain-lookup-2/src/qemu_driver.c libvirt-network-lookup/src/qemu_driver.c
--- libvirt-domain-lookup-2/src/qemu_driver.c	2007-07-04 10:21:04.000000000 +0100
+++ libvirt-network-lookup/src/qemu_driver.c	2007-07-04 10:28:36.000000000 +0100
@@ -2180,7 +2180,7 @@ static virNetworkPtr qemudNetworkLookupB
     virNetworkPtr net;
 
     if (!network) {
-        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "no network with matching uuid");
+        qemudReportError(conn, NULL, NULL, VIR_ERR_NO_NETWORK, "no network with matching uuid");
         return NULL;
     }
 
@@ -2198,7 +2198,7 @@ static virNetworkPtr qemudNetworkLookupB
     virNetworkPtr net;
 
     if (!network) {
-        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "no network with matching name");
+        qemudReportError(conn, NULL, NULL, VIR_ERR_NO_NETWORK, "no network with matching name");
         return NULL;
     }
 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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