4 #define KERN_EMERG "<0>" /* system is unusable */
5 #define KERN_ALERT "<1>" /* action must be taken immediately */
6 #define KERN_CRIT "<2>" /* critical conditions */
7 #define KERN_ERR "<3>" /* error conditions */
8 #define KERN_WARNING "<4>" /* warning conditions */
9 #define KERN_NOTICE "<5>" /* normal but significant condition */
10 #define KERN_INFO "<6>" /* informational */
11 #define KERN_DEBUG "<7>" /* debug-level messages */
12 #define KERN_USERMSG "<8>" /* message from user-space */
13 #define KERN_NORM "<9>" /* a "normal" message, nothing special */
15 #define USER_EMERG "<0>" /* system is unusable */
16 #define USER_ALERT "<1>" /* action must be taken immediately */
17 #define USER_CRIT "<2>" /* critical conditions */
18 #define USER_ERR "<3>" /* error conditions */
19 #define USER_WARNING "<4>" /* warning conditions */
20 #define USER_NOTICE "<5>" /* normal but significant condition */
21 #define USER_INFO "<6>" /* informational */
22 #define USER_DEBUG "<7>" /* debug-level messages */
23 #define USER_USERMSG "<8>" /* message from user-space */
24 #define USER_NORM "" /* a "normal" message, nothing special */
27 #define TYPE_EMERG KERN_EMERG
28 #define TYPE_ALERT KERN_ALERT
29 #define TYPE_CRIT KERN_CRIT
30 #define TYPE_ERR KERN_ERR
31 #define TYPE_WARNING KERN_WARNING
32 #define TYPE_NOTICE KERN_NOTICE
33 #define TYPE_INFO KERN_INFO
34 #define TYPE_DEBUG KERN_DEBUG
35 #define TYPE_USERMSG KERN_USERMSG
36 #define TYPE_NORM KERN_NORM
38 #define TYPE_EMERG USER_EMERG
39 #define TYPE_ALERT USER_ALERT
40 #define TYPE_CRIT USER_CRIT
41 #define TYPE_ERR USER_ERR
42 #define TYPE_WARNING USER_WARNING
43 #define TYPE_NOTICE USER_NOTICE
44 #define TYPE_INFO USER_INFO
45 #define TYPE_DEBUG USER_DEBUG
46 #define TYPE_USERMSG USER_USERMSG
47 #define TYPE_NORM USER_NORM
52 #include <lwk/types.h>
53 extern int sprintf(char * buf, const char * fmt, ...)
54 __attribute__ ((format (printf, 2, 3)));
55 extern int vsprintf(char *buf, const char *, va_list)
56 __attribute__ ((format (printf, 2, 0)));
57 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
58 __attribute__ ((format (printf, 3, 4)));
59 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
60 __attribute__ ((format (printf, 3, 0)));
61 extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
62 __attribute__ ((format (printf, 3, 4)));
63 extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
64 __attribute__ ((format (printf, 3, 0)));
65 extern int vprintk(const char *fmt, va_list args)
66 __attribute__ ((format (printf, 1, 0)));
67 extern int printk(const char * fmt, ...)
68 __attribute__ ((format (printf, 1, 2)));