printk: introduce struct printk_buffers
authorJohn Ogness <john.ogness@linutronix.de>
Mon, 9 Jan 2023 10:07:56 +0000 (11:13 +0106)
committerPetr Mladek <pmladek@suse.com>
Wed, 11 Jan 2023 14:35:11 +0000 (15:35 +0100)
commitdaaab5b5bba36a5aef790230b610556b9bbd9cfc
tree6aaebc0568895db28e983544f5413a4fb31a38c2
parent02b2396d7d0cf806e80c887b4c799d482d6977ed
printk: introduce struct printk_buffers

Introduce a new struct printk_buffers to contain all the buffers
needed to read and format a printk message for output. Putting the
buffers inside a struct reduces the number of buffer pointers that
need to be tracked. Also, it allows usage of the sizeof() macro for
the buffer sizes, rather than expecting certain sized buffers being
passed in.

Note that since the output buffer for normal consoles is now
CONSOLE_EXT_LOG_MAX instead of CONSOLE_LOG_MAX, multi-line
messages that may have been previously truncated will now be
printed in full. This should be considered a feature and not a bug
since the CONSOLE_LOG_MAX restriction was about limiting static
buffer usage rather than limiting printed text.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20230109100800.1085541-5-john.ogness@linutronix.de
kernel/printk/internal.h
kernel/printk/printk.c