Annotation of linux/kernel/printk.c, revision 1.1.1.3

1.1       root        1: /*
1.1.1.2   root        2:  *  linux/kernel/printk.c
                      3:  *
                      4:  *  (C) 1991  Linus Torvalds
                      5:  */
                      6: 
                      7: /*
1.1       root        8:  * When in kernel-mode, we cannot use printf, as fs is liable to
                      9:  * point to 'interesting' things. Make a printf with fs-saving, and
                     10:  * all is well.
                     11:  */
                     12: #include <stdarg.h>
                     13: #include <stddef.h>
                     14: 
                     15: #include <linux/kernel.h>
                     16: 
                     17: static char buf[1024];
                     18: 
1.1.1.2   root       19: extern int vsprintf(char * buf, const char * fmt, va_list args);
                     20: 
1.1       root       21: int printk(const char *fmt, ...)
                     22: {
                     23:        va_list args;
                     24:        int i;
                     25: 
                     26:        va_start(args, fmt);
                     27:        i=vsprintf(buf,fmt,args);
                     28:        va_end(args);
1.1.1.3 ! root       29:        console_print(buf);
1.1       root       30:        return i;
                     31: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.