[Libvirt-cim] [PATCH] Remove newline characters from CU_DEBUG calls now that the newline is automatic. Also remove a few debug messages that are no longer necessary and clutter output

Jay Gagnon grendel at linux.vnet.ibm.com
Thu Nov 1 17:55:47 UTC 2007


# HG changeset patch
# User Jay Gagnon <grendel at linux.vnet.ibm.com>
# Date 1193939694 14400
# Node ID 66e4bd0fd892e97719769b5ad3128ed2ccbfc514
# Parent  308064b52d99dcfff6315a309cc8aa66cb55f556
Remove newline characters from CU_DEBUG calls now that the newline is automatic.  Also remove a few debug messages that are no longer necessary and clutter output.

Signed-off-by: Jay Gagnon <grendel at linux.vnet.ibm.com>

diff -r 308064b52d99 -r 66e4bd0fd892 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c	Thu Nov 01 13:48:50 2007 -0400
+++ b/src/Virt_SettingsDefineCapabilities.c	Thu Nov 01 13:54:54 2007 -0400
@@ -51,12 +51,10 @@ static bool rasd_prop_copy_value(struct 
 {
         bool rc = true;
 
-        CU_DEBUG("Copying '%s'.\n", src.field);
+        CU_DEBUG("Copying '%s'.", src.field);
         if (src.type & CMPI_string) {
-                CU_DEBUG("String type.\n");
                 dest->value = (CMPIValue *)strdup((char *)src.value);
         } else if (src.type & CMPI_INTEGER) {
-                CU_DEBUG("Integer type.\n");
                 dest->value = malloc(sizeof(CMPIValue));
                 memcpy(dest->value, src.value, sizeof(CMPIValue));
         } else {
@@ -74,7 +72,6 @@ static bool dup_rasd_prop_list(struct sd
         *dest = NULL;
         
         for (i = 0, count = 1; src[i].field != NULL; i++, count++) {
-                CU_DEBUG("count: %d, i: %d.  reallocing.\n", count, i);
                 *dest = realloc(*dest, count * sizeof(struct sdc_rasd_prop));
                 (*dest)[i].field = strdup(src[i].field);
                 ret = rasd_prop_copy_value(src[i], &(*dest)[i]);
@@ -82,7 +79,6 @@ static bool dup_rasd_prop_list(struct sd
         }
         
         /* Make sure to terminate the list. */
-        CU_DEBUG("Terminating list. count: %d, i: %d\n", count, i);
         *dest = realloc(*dest, count * sizeof(struct sdc_rasd_prop));
         (*dest)[i] = (struct sdc_rasd_prop)PROP_END;
 
@@ -386,16 +382,16 @@ static CMPIInstance *sdc_rasd_inst(const
         CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16);
 
         for (i = 0; prop_list[i].field != NULL; i++) {
-                CU_DEBUG("Setting property '%s'.\n", prop_list[i].field);
+                CU_DEBUG("Setting property '%s'.", prop_list[i].field);
                 CMSetProperty(inst, prop_list[i].field, 
                               prop_list[i].value, prop_list[i].type);
-                CU_DEBUG("Set.\n");
-        }
-
-        CU_DEBUG("freeing prop_list.\n");
+                CU_DEBUG("Set.");
+        }
+
+        CU_DEBUG("freeing prop_list.");
         free_rasd_prop_list(prop_list);
  out:
-        CU_DEBUG("Returning inst.\n");
+        CU_DEBUG("Returning inst.");
         return inst;
 }
 
@@ -422,17 +418,17 @@ static CMPIStatus sdc_rasds_for_type(con
                                 CU_DEBUG("Problem getting inst.");
                                 goto out;
                         }
-                        CU_DEBUG("Got inst.\n");
+                        CU_DEBUG("Got inst.");
                         if (inst != NULL) {
                                 inst_list_add(list, inst);
-                                CU_DEBUG("Added inst.\n");
+                                CU_DEBUG("Added inst.");
                         } else {
-                                CU_DEBUG("Inst is null, not added.\n");
+                                CU_DEBUG("Inst is null, not added.");
                         }
                 }
                 
         } else {
-                CU_DEBUG("Unsupported type.\n");
+                CU_DEBUG("Unsupported type.");
                 CMSetStatusWithChars(_BROKER, &s, CMPI_RC_ERR_FAILED,
                                      "Unsupported device type.");
         }
@@ -449,7 +445,7 @@ static CMPIStatus alloc_cap_to_rasd(cons
         int ret;
         uint16_t type;
 
-        CU_DEBUG("Getting ResourceType.\n");
+        CU_DEBUG("Getting ResourceType.");
 
         ret = cu_get_u16_path(ref, "ResourceType", &type);
         if (ret != 1) {
@@ -458,7 +454,7 @@ static CMPIStatus alloc_cap_to_rasd(cons
                 goto out;
         }
         
-        CU_DEBUG("ResourceType: %hi.\n", type);
+        CU_DEBUG("ResourceType: %hi.", type);
 
         s = sdc_rasds_for_type(ref, list, type);
 




More information about the Libvirt-cim mailing list