]> xenbits.xensource.com Git - people/liuw/rumprun.git/commitdiff
we also need a vprintf() variant, so add it
authorAntti Kantee <pooka@iki.fi>
Wed, 15 Apr 2015 08:23:30 +0000 (08:23 +0000)
committerAntti Kantee <pooka@iki.fi>
Wed, 15 Apr 2015 08:23:30 +0000 (08:23 +0000)
include/bmk-core/printf.h
lib/librumprun_core/subr_prf.c

index e1d271f9dfa43aa8b35643957dcc4df71dd8da52..b0bf1844c4c9a26939d696b24a7b552dbd394dec 100644 (file)
@@ -39,6 +39,8 @@ typedef __builtin_va_list va_list;
 #define va_arg                  __builtin_va_arg
 #define va_end(ap)              __builtin_va_end(ap)
 
+void   bmk_vprintf(const char *, va_list)
+       __attribute__((__format__(__printf__,1,0)));
 int    bmk_vsnprintf(char *, unsigned long, const char *fmt, va_list)
        __attribute__((__format__(__printf__,3,0)));
 #endif /* _BMK_PRINTF_VA */
index 3985d353dcf1c358c3f134225e1ad7dbf1c8c1a4..fe4725c871855c1811c1cf91cbd61ca2e2a3c89f 100644 (file)
@@ -140,6 +140,20 @@ bmk_printf(const char *fmt, ...)
         kprintf_unlock();
 }
 
+/*
+ * vprintf: print a message to the console and the log [already have
+ *      va_list]
+ */
+void
+bmk_vprintf(const char *fmt, va_list ap)
+{
+       kprintf_lock();
+
+       kprintf(fmt, TOCONS, NULL, NULL, ap);
+
+       kprintf_unlock();
+}
+
 /*
  * bmk_snprintf: print a message to a buffer
  */