提交 c668c897 编写于 作者: E Eric Blake

command: reduce duplicated debug messages

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.
上级 ccf7c4b9
......@@ -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]))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册