]> git.baikalelectronics.ru Git - kernel.git/commit
printk: suppress empty continuation lines
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Oct 2016 16:11:24 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Oct 2016 16:11:24 +0000 (09:11 -0700)
commitc0b0addfc23a117348da61a20de055454dc6fc61
tree29baa574daa8ea326ac07ba43a21e23d7a792fc0
parent877f9e237211e5c06d2a3b44827b89277ee56809
printk: suppress empty continuation lines

We have a fairly common pattern where you print several things as
continuations on one single line in a loop, and then at the end you do

printk(KERN_CONT "\n");

to flush the buffered output.

But if the output was flushed by something else (concurrent printk
activity, or just system logging), we don't want that final flushing to
just print an empty line.

So just suppress empty continuation lines when they couldn't be merged
into the line they are a continuation of.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/printk/printk.c