From b5d250a50ec0ae873fea50cc574d056620032ec5 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Thu, 15 Sep 2016 20:03:05 +0100 Subject: Kernel debug messages: new chapter about different printk macroses --- md/writeup/kernel_debug_messages.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/md/writeup/kernel_debug_messages.md b/md/writeup/kernel_debug_messages.md index 38b566a..2a36696 100644 --- a/md/writeup/kernel_debug_messages.md +++ b/md/writeup/kernel_debug_messages.md @@ -141,6 +141,26 @@ Here is defined formating specifiers __Documentation/printk-formats.txt__ | bitfields such as page flags, gfp_flags | %pG[pgv] | | netdev_features_t | %pNF | +## Shortened printk versions +Header files defines shortcut versions of print functions for each of log level. + +| Function names | Note | +| --- | --- | +| pr_emerg | | +| pr_alert | | +| pr_crit | | +| pr_err | | +| pr_warn | | +| pr_notice | | +| pr_info | | +| no_printk | dummy printk without output | +| pr_devel | when DEBUG is defined | +| printk_once | print one time messages | +| printk_deferred_once | | +| pr_*_once | print once loglevel specific| +| printk_ratelimited | | +| pr_*_ratelimited | printk with loglevel and ratelimit | + ## Links 1. http://elinux.org/Debugging_by_printing -- cgit v1.2.3