aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 12:29:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 12:29:50 -0400
commit563873318d328d9bbab4b00dfd835ac7c7e28697 (patch)
tree0fcdebe4abb52d340c144efd0a494c217b2c58ba /drivers/tty
parent24532f768121b07b16178ffb40442ece43365cbd (diff)
parentbfd8d3f23b51018388be0411ccbc2d56277fe294 (diff)
Merge branch 'printk-cleanups'
Merge my system logging cleanups, triggered by the broken '\n' patches. The line continuation handling has been broken basically forever, and the code to handle the system log records was both confusing and dubious. And it would do entirely the wrong thing unless you always had a terminating newline, partly because it couldn't actually see whether a message was marked KERN_CONT or not (but partly because the LOG_CONT handling in the recording code was rather confusing too). This re-introduces a real semantically meaningful KERN_CONT, and fixes the few places I noticed where it was missing. There are probably more missing cases, since KERN_CONT hasn't actually had any semantic meaning for at least four years (other than the checkpatch meaning of "no log level necessary, this is a continuation line"). This also allows the combination of KERN_CONT and a log level. In that case the log level will be ignored if the merging with a previous line is successful, but if a new record is needed, that new record will now get the right log level. That also means that you can at least in theory combine KERN_CONT with the "pr_info()" style helpers, although any use of pr_fmt() prefixing would make that just result in a mess, of course (the prefix would end up in the middle of a continuing line). * printk-cleanups: printk: make reading the kernel log flush pending lines printk: re-organize log_output() to be more legible printk: split out core logging code into helper function printk: reinstate KERN_CONT for printing continuation lines
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/vt/vt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index e841a4e0e726..06fb39c1d6dd 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3187,11 +3187,11 @@ static int do_bind_con_driver(const struct consw *csw, int first, int last,
3187 3187
3188 pr_info("Console: switching "); 3188 pr_info("Console: switching ");
3189 if (!deflt) 3189 if (!deflt)
3190 printk("consoles %d-%d ", first+1, last+1); 3190 printk(KERN_CONT "consoles %d-%d ", first+1, last+1);
3191 if (j >= 0) { 3191 if (j >= 0) {
3192 struct vc_data *vc = vc_cons[j].d; 3192 struct vc_data *vc = vc_cons[j].d;
3193 3193
3194 printk("to %s %s %dx%d\n", 3194 printk(KERN_CONT "to %s %s %dx%d\n",
3195 vc->vc_can_do_color ? "colour" : "mono", 3195 vc->vc_can_do_color ? "colour" : "mono",
3196 desc, vc->vc_cols, vc->vc_rows); 3196 desc, vc->vc_cols, vc->vc_rows);
3197 3197
@@ -3200,7 +3200,7 @@ static int do_bind_con_driver(const struct consw *csw, int first, int last,
3200 update_screen(vc); 3200 update_screen(vc);
3201 } 3201 }
3202 } else 3202 } else
3203 printk("to %s\n", desc); 3203 printk(KERN_CONT "to %s\n", desc);
3204 3204
3205 retval = 0; 3205 retval = 0;
3206err: 3206err: