helpers.c: New function, printv()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-07-02 12:43:41 +02:00
parent cd947a69a8
commit cda5938215
3 changed files with 23 additions and 15 deletions
+4 -5
View File
@@ -153,7 +153,6 @@ int run_interactive(char *cmd, char *fmt, ...)
{
int status, oldout = 1, olderr = 2;
char line[LINE_SIZE];
va_list ap;
FILE *fp;
if (!cmd) {
@@ -162,11 +161,11 @@ int run_interactive(char *cmd, char *fmt, ...)
}
if (fmt) {
va_start(ap, fmt);
vsnprintf(line, sizeof(line), fmt, ap);
va_end(ap);
va_list ap;
print_desc("", line);
va_start(ap, fmt);
printv(fmt, ap);
va_end(ap);
}
/* Redirect output from cmd to a tempfile */