# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1199807895 28800
# Node ID 1bc8313927de11949fbc17b163bc838d754553b7
# Parent 021caa2990b499190a1123727ee52e2d6eaff209
.#2 Replace printf() with CU_DEBUG in EAFP.
Update - removed platform-dependent bit-width values and an extraneous "\n".
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 021caa2990b4 -r 1bc8313927de src/Virt_ElementAllocatedFromPool.c
--- a/src/Virt_ElementAllocatedFromPool.c Tue Jan 08 07:48:08 2008 -0800
+++ b/src/Virt_ElementAllocatedFromPool.c Tue Jan 08 07:58:15 2008 -0800
@@ -135,7 +135,7 @@ static int filter_by_pool(struct inst_li
if ((dev_id == NULL) || (cn == NULL))
continue;
- printf("Device %hhi:%s", type, dev_id);
+ CU_DEBUG("Got DeviceID: %s", dev_id);
poolid = pool_member_of(_BROKER, cn, type, dev_id);
if (poolid && STREQ(poolid, _poolid))
@@ -162,11 +162,11 @@ static int devs_from_pool(uint16_t type,
if (conn == NULL)
return 0;
- printf("Connected\n");
+ CU_DEBUG("Connected");
count = get_domain_list(conn, &doms);
- printf("Got %i domains\n", count);
+ CU_DEBUG("Got %i domains", count);
for (i = 0; i < count; i++) {
const char *name;
@@ -179,11 +179,11 @@ static int devs_from_pool(uint16_t type,
/* FIXME: Get VIRT_DEV_ type here */
dom_devices(_BROKER, doms[i], ns, type, &tmp);
- printf("Got devices\n");
+ CU_DEBUG("Got devices");
filter_by_pool(list, &tmp, type, poolid);
- printf("Filtered\n");
+ CU_DEBUG("Filtered");
inst_list_free(&tmp);
virDomainFree(doms[i]);
@@ -214,7 +214,7 @@ static CMPIStatus pool_to_vdev(const CMP
goto out;
}
- CU_DEBUG("Got %s\n", poolid);
+ CU_DEBUG("Got %s", poolid);
type = device_type_from_poolid(poolid);
if (type == VIRT_DEV_UNKNOWN) {
Show replies by date