]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
command: reduce duplicated debug messages
authorEric Blake <eblake@redhat.com>
Mon, 13 Jun 2011 21:20:03 +0000 (15:20 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 14 Jun 2011 15:17:57 +0000 (09:17 -0600)
This also reduces malloc pressure for invoking a child when
VIR_DEBUG is enabled.

* src/util/command.c (virExecWithHook): Drop debug, since the only
caller (virCommandRunAsync) also prints debug info.

src/util/command.c

index 0f8ff14accb8fcac46a9f667726480d392c6e9c1..11443922c9c2e3b53f9b1dfb0d983d5894b9037f 100644 (file)
@@ -296,26 +296,6 @@ virExecWithHook(const char *const*argv,
     int tmpfd;
     const char *binary = NULL;
     int forkRet;
-    char *argv_str = NULL;
-    char *envp_str = NULL;
-
-    if ((argv_str = virArgvToString(argv)) == NULL) {
-        virReportOOMError();
-        return -1;
-    }
-
-    if (envp) {
-        if ((envp_str = virArgvToString(envp)) == NULL) {
-            VIR_FREE(argv_str);
-            virReportOOMError();
-            return -1;
-        }
-        VIR_DEBUG("%s %s", envp_str, argv_str);
-        VIR_FREE(envp_str);
-    } else {
-        VIR_DEBUG("%s", argv_str);
-    }
-    VIR_FREE(argv_str);
 
     if (argv[0][0] != '/') {
         if (!(binary = virFindFileInPath(argv[0]))) {