[Libvirt-cim] [PATCH] .#3 Replace printf() with CU_DEBUG in EAFP

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Tue Jan 8 16:19:14 UTC 2008


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1199808925 28800
# Node ID 39bab8bae81e4bc102085144cea5f8c4016fde69
# Parent  021caa2990b499190a1123727ee52e2d6eaff209
.#3 Replace printf() with CU_DEBUG in EAFP.

Update - removed unnecessary printfs.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 021caa2990b4 -r 39bab8bae81e 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 08:15:25 2008 -0800
@@ -135,8 +135,6 @@ static int filter_by_pool(struct inst_li
                 if ((dev_id == NULL) || (cn == NULL))
                         continue;
 
-                printf("Device %hhi:%s", type, dev_id);
-
                 poolid = pool_member_of(_BROKER, cn, type, dev_id);
                 if (poolid && STREQ(poolid, _poolid))
                         inst_list_add(dest, inst);
@@ -162,12 +160,8 @@ static int devs_from_pool(uint16_t type,
         if (conn == NULL)
                 return 0;
 
-        printf("Connected\n");
-
         count = get_domain_list(conn, &doms);
 
-        printf("Got %i domains\n", count);
-        
         for (i = 0; i < count; i++) {
                 const char *name;
                 struct inst_list tmp;
@@ -179,11 +173,7 @@ 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");
-
                 filter_by_pool(list, &tmp, type, poolid);
-
-                printf("Filtered\n");
 
                 inst_list_free(&tmp);
                 virDomainFree(doms[i]);




More information about the Libvirt-cim mailing list