summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-12-11 02:50:15 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 04:41:11 +0300
commita39d4a857d4bb0a62d6655c0d69f7387fe1ad160 (patch)
treea10a09dd5750a654992d9cd72e940a7c8d0f707a /include
parentf80e696854c95725cf7faf9776e02f00600780d3 (diff)
downloadlinux-a39d4a857d4bb0a62d6655c0d69f7387fe1ad160.tar.xz
printk: add and use LOGLEVEL_<level> defines for KERN_<LEVEL> equivalents
Use #defines instead of magic values. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jason Baron <jbaron@akamai.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kern_levels.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/kern_levels.h b/include/linux/kern_levels.h
index 866caaa9e2bb..c2ce155d83cc 100644
--- a/include/linux/kern_levels.h
+++ b/include/linux/kern_levels.h
@@ -22,4 +22,17 @@
*/
#define KERN_CONT ""
+/* integer equivalents of KERN_<LEVEL> */
+#define LOGLEVEL_SCHED -2 /* Deferred messages from sched code
+ * are set to this special level */
+#define LOGLEVEL_DEFAULT -1 /* default (or last) loglevel */
+#define LOGLEVEL_EMERG 0 /* system is unusable */
+#define LOGLEVEL_ALERT 1 /* action must be taken immediately */
+#define LOGLEVEL_CRIT 2 /* critical conditions */
+#define LOGLEVEL_ERR 3 /* error conditions */
+#define LOGLEVEL_WARNING 4 /* warning conditions */
+#define LOGLEVEL_NOTICE 5 /* normal but significant condition */
+#define LOGLEVEL_INFO 6 /* informational */
+#define LOGLEVEL_DEBUG 7 /* debug-level messages */
+
#endif