X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=kitten%2Fkernel%2Fprintk.c;h=b410ec6da1f08e5bd4f5f7fb26ef9157f16e16f5;hb=f8f34325f488003363eba70f03356618735130e4;hp=d0e2bf1f3aec5439cc21a06c4ed7a52771a6055b;hpb=2e57ef0322ceae58a086e143c6e92224229a40ba;p=palacios-OLD.git diff --git a/kitten/kernel/printk.c b/kitten/kernel/printk.c index d0e2bf1..b410ec6 100644 --- a/kitten/kernel/printk.c +++ b/kitten/kernel/printk.c @@ -8,6 +8,19 @@ int printk(const char *fmt, ...) { va_list args; + va_start(args, fmt); + int rc = vprintk( fmt, args ); + va_end(args); + return rc; +} + + +int +vprintk( + const char * fmt, + va_list args +) +{ int len; char buf[1024]; char *p = buf; @@ -22,9 +35,7 @@ int printk(const char *fmt, ...) remain -= len; /* Construct the string... */ - va_start(args, fmt); len = vscnprintf(p, remain, fmt, args); - va_end(args); /* Pass the string to the console subsystem */ console_write(buf);