Commit 085a3a8f authored by James Byrne's avatar James Byrne Committed by Petr Mladek

ABI: Update dev-kmsg documentation to match current kernel behaviour

Commit 5aa068ea ("printk: remove games with previous record flags")
abolished the practice of setting the log flag to 'c' for the first
continuation line and '+' for subsequent lines. Now all continuation
lines are flagged with 'c' and '+' is never used.

Update the 'dev-kmsg' documentation to remove the reference to the
obsolete '+' flag. In addition, state explicitly that only 8 bits of the
<N> syslog prefix are used for the facility number when writing to
/dev/kmsg.

Link: http://lkml.kernel.org/r/0102016cf1b26630-8e9b337b-da49-43c6-b028-4250c2fac3ef-000000@eu-west-1.amazonses.com
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarJames Byrne <james.byrne@origamienergy.com>
Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent 35c35493
...@@ -12,7 +12,7 @@ Description: The /dev/kmsg character device node provides userspace access ...@@ -12,7 +12,7 @@ Description: The /dev/kmsg character device node provides userspace access
The logged line can be prefixed with a <N> syslog prefix, which The logged line can be prefixed with a <N> syslog prefix, which
carries the syslog priority and facility. The single decimal carries the syslog priority and facility. The single decimal
prefix number is composed of the 3 lowest bits being the syslog prefix number is composed of the 3 lowest bits being the syslog
priority and the higher bits the syslog facility number. priority and the next 8 bits the syslog facility number.
If no prefix is given, the priority number is the default kernel If no prefix is given, the priority number is the default kernel
log priority and the facility number is set to LOG_USER (1). It log priority and the facility number is set to LOG_USER (1). It
...@@ -90,13 +90,12 @@ Description: The /dev/kmsg character device node provides userspace access ...@@ -90,13 +90,12 @@ Description: The /dev/kmsg character device node provides userspace access
+sound:card0 - subsystem:devname +sound:card0 - subsystem:devname
The flags field carries '-' by default. A 'c' indicates a The flags field carries '-' by default. A 'c' indicates a
fragment of a line. All following fragments are flagged with fragment of a line. Note, that these hints about continuation
'+'. Note, that these hints about continuation lines are not lines are not necessarily correct, and the stream could be
necessarily correct, and the stream could be interleaved with interleaved with unrelated messages, but merging the lines in
unrelated messages, but merging the lines in the output the output usually produces better human readable results. A
usually produces better human readable results. A similar similar logic is used internally when messages are printed to
logic is used internally when messages are printed to the the console, /proc/kmsg or the syslog() syscall.
console, /proc/kmsg or the syslog() syscall.
By default, kernel tries to avoid fragments by concatenating By default, kernel tries to avoid fragments by concatenating
when it can and fragments are rare; however, when extended when it can and fragments are rare; however, when extended
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment