# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1235768841 10800
# Node ID b5acbf9fcbba3568fba1f7ce2d721a0886a177ab
# Parent 5d628d1be4d7777f8a14d1cc1818dcb26baae857
This patch exposes error messages from libvirt calls in Virt_DevicePool.c
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 5d628d1be4d7 -r b5acbf9fcbba src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Fri Feb 27 18:06:34 2009 -0300
+++ b/src/Virt_DevicePool.c Fri Feb 27 18:07:21 2009 -0300
@@ -712,9 +712,10 @@
CU_DEBUG("Looking up network `%s'", netname);
network = virNetworkLookupByName(conn, netname);
if (network == NULL) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "No such NetworkPool: %s", netname);
+ virt_set_status(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ conn,
+ "No such NetworkPool: %s", netname);
goto out;
}
@@ -740,9 +741,10 @@
bridge = virNetworkGetBridgeName(network);
if (asprintf(&cap, "Bridge: %s", bridge) == -1) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "");
+ virt_set_status(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ conn,
+ "");
goto out;
}
@@ -780,9 +782,11 @@
nets = virConnectNumOfNetworks(conn);
if (nets < 0) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to list networks");
+ virt_set_status(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ conn,
+ "Unable to list networks");
+
goto out;
}