Add log_valist()
authorJens Axboe <jens.axboe@oracle.com>
Fri, 19 Mar 2010 15:50:37 +0000 (16:50 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 19 Mar 2010 15:50:37 +0000 (16:50 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
debug.c
log.h

diff --git a/debug.c b/debug.c
index 2eb3b6f932be7b9fd398beac920e5a928872928e..9722878a538b84bef408a2d0d7c1c259b8704941 100644 (file)
--- a/debug.c
+++ b/debug.c
@@ -22,6 +22,6 @@ void __dprint(int type, const char *str, ...)
        log_info("%-5u ", (int) pid);
 
        va_start(args, str);
-       vfprintf(f_out, str, args);
+       log_valist(str, args);
        va_end(args);
 }
diff --git a/log.h b/log.h
index 5ca37b391a454cbc29a2992ab5bc9b382a328b99..71f89c1a04c0eeb7c0187ef59a8a6ce7cbce9db1 100644 (file)
--- a/log.h
+++ b/log.h
@@ -16,6 +16,7 @@ extern FILE *f_err;
        } while (0)
 
 #define log_info(args...)      fprintf(f_out, ##args)
+#define log_valist(str, args)  vfprintf(f_out, (str), (args))
 
 FILE *get_f_out(void);
 FILE *get_f_err(void);