summaryrefslogtreecommitdiff
path: root/md/writeup/kernel_debug_messages.md
diff options
context:
space:
mode:
Diffstat (limited to 'md/writeup/kernel_debug_messages.md')
-rw-r--r--md/writeup/kernel_debug_messages.md20
1 files changed, 20 insertions, 0 deletions
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