
# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1234981406 10800 # Node ID 9ffb5f88de2b5abc58d80bb647c352e5ddf94de4 # Parent 9aeb111b89fb3b1428f8b21af5368a6b5c57f948 This patch exposes error messages from libvirt calls in ComputerSystem Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r 9aeb111b89fb -r 9ffb5f88de2b src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Wed Feb 18 15:23:02 2009 -0300 +++ b/src/Virt_ComputerSystem.c Wed Feb 18 15:23:26 2009 -0300 @@ -570,10 +570,11 @@ dom = virDomainLookupByName(conn, name); if (dom == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s).", - name); + virt_set_status(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Referenced domain `%s' does not exist", + name); goto out; } @@ -790,9 +791,10 @@ xml = virDomainGetXMLDesc(dom, 0); if (xml == NULL) { CU_DEBUG("Unable to retrieve domain XML"); - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Unable to get domain definition"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get domain definition"); return s; } @@ -1003,16 +1005,18 @@ dom = virDomainLookupByName(conn, name); if (dom == NULL) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Domain not found"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Domain not found"); goto out; } if (virDomainGetInfo(dom, &info) != 0) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Unable to get current state"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get current state"); goto out; }