diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /upstream/mageia-cauldron/man9/printk.9 | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/mageia-cauldron/man9/printk.9')
-rw-r--r-- | upstream/mageia-cauldron/man9/printk.9 | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/upstream/mageia-cauldron/man9/printk.9 b/upstream/mageia-cauldron/man9/printk.9 new file mode 100644 index 00000000..892812d9 --- /dev/null +++ b/upstream/mageia-cauldron/man9/printk.9 @@ -0,0 +1,78 @@ +.\" -*- nroff -*- +.TH printk 9 "$Date:$" "Linux DDI" "Kernel Functions" +.SH NAME +printk \- print messages to console log +.SH SYNOPSIS +.B #include <linux/kernel.h> +.sp +.BI "int printk(const char*" fmt ", ...)" +.SH DESCRIPTION +Print a formatted message to the kernel console, much like the +.B printf +function of the stdio library. Normally, the message is written to the +physical console device of the computer, although this behavior can be +changed with the +.B register_console +function. Messages are also stored in a message log book. +.PP +The generated string may also start with a message priority code, +which sets the priority of the message. The priority code strings are +of the form +.I "<n>" +where n is a number from 0 - 7. The following macros are defined in +the +.I "<linux/kernel.h>" +header file: +.RS +.TP +KERN_EMERG +System is unuseable +.TP +KERN_ALERT +Action must be taken immediately +.TP +KERN_CRIT +Critical conditions +.TP +KERN_ERR +Error conditions +.TP +KERN_WARNING +Warning conditions +.TP +KERN_NOTICE +Normal but significant condition +.TP +KERN_INFO +Informational +.TP +KERN_DEBUG +Debug-level messages +.RE + +For example +.nf + + printk(KERN_NOTICE "Hello, world.\\n"); + +.fi +does the expected thing. +.SH "RETURN VALUE" +Returns the number of characters written to the log. +.SH AVAILABILITY +Linux 1.0+ +.SH "SEE ALSO" +.BR register_console "(9), " syslog "(2)" +.PP +.IR "kernel/printk.c" +.SH AUTHOR +Stephen Williams (steve@icarus.com) +.SH BUGS +float and double formats are not supported. Floats and doubles do not +belong inside the kernel anyhow. +.PP +The +.B printk +implementation protects itself from interruption, so in principle it +can be used in interrupts handlers and critical sections. However, +there are no guarantees about the console function that is registered. |