[PATCH] Add a little debugging to the device path

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1221064039 25200 # Node ID 5d114b296a8228d1e591e1908fbecd4a96152e5e # Parent b3f75efd7baf6dd6e1b023fdb91163f699c1a7c9 Add a little debugging to the device path This helps a client or user figure out why a disk instance isn't found. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r b3f75efd7baf -r 5d114b296a82 src/Virt_Device.c --- a/src/Virt_Device.c Wed Sep 10 09:25:53 2008 -0700 +++ b/src/Virt_Device.c Wed Sep 10 09:27:19 2008 -0700 @@ -530,8 +530,10 @@ int i; count = get_devices(dom, &list, type); - if (!count) + if (!count) { + CU_DEBUG("No devices for %i", type); goto out; + } if (type == CIM_RES_TYPE_PROC) { struct virt_device *tmp_list; @@ -585,7 +587,7 @@ if (parse_devid(name, &domain, &device) != 1) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", + "No such instance (bad id %s)", name); goto out; } @@ -594,7 +596,7 @@ if (dom == NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", + "No such instance (no domain for %s)", name); goto err; } @@ -603,7 +605,7 @@ if (!dev) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", + "No such instance (no device %s)", name); goto err; }

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1221064039 25200 # Node ID 5d114b296a8228d1e591e1908fbecd4a96152e5e # Parent b3f75efd7baf6dd6e1b023fdb91163f699c1a7c9 Add a little debugging to the device path
This helps a client or user figure out why a disk instance isn't found.
Signed-off-by: Dan Smith <danms@us.ibm.com>
+1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Dan Smith
-
Kaitlin Rupert