]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/printk.h
kernel/printk: use symbolic defines for console loglevels
[mirror_ubuntu-artful-kernel.git] / include / linux / printk.h
index 37f3a6589c1cabf5f121a91f1250a4fc516c0808..319ff7e53efbc1f0bd551125bd70951c2a8c83ea 100644 (file)
@@ -30,6 +30,17 @@ static inline const char *printk_skip_level(const char *buffer)
        return buffer;
 }
 
+/* printk's without a loglevel use this.. */
+#define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL
+
+/* We show everything that is MORE important than this.. */
+#define CONSOLE_LOGLEVEL_SILENT  0 /* Mum's the word */
+#define CONSOLE_LOGLEVEL_MIN    1 /* Minimum loglevel we let people use */
+#define CONSOLE_LOGLEVEL_QUIET  4 /* Shhh ..., when booted with "quiet" */
+#define CONSOLE_LOGLEVEL_DEFAULT 7 /* anything MORE serious than KERN_DEBUG */
+#define CONSOLE_LOGLEVEL_DEBUG 10 /* issue debug messages */
+#define CONSOLE_LOGLEVEL_MOTORMOUTH 15 /* You can't shut this one up */
+
 extern int console_printk[];
 
 #define console_loglevel (console_printk[0])
@@ -39,13 +50,13 @@ extern int console_printk[];
 
 static inline void console_silent(void)
 {
-       console_loglevel = 0;
+       console_loglevel = CONSOLE_LOGLEVEL_SILENT;
 }
 
 static inline void console_verbose(void)
 {
        if (console_loglevel)
-               console_loglevel = 15;
+               console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
 }
 
 struct va_format {