]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kdb,vt_console: Fix missed data due to pager overruns
authorJason Wessel <jason.wessel@windriver.com>
Mon, 27 Aug 2012 03:37:03 +0000 (22:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Oct 2012 16:27:59 +0000 (09:27 -0700)
commitc4c493a4adcee75e1e44af044d0b7fc1b5192b61
tree5209e3b5533486721824ee61514ac24749e06d2b
parent9b38cc4a70f2c83857fd37707570a18c1027effe
kdb,vt_console: Fix missed data due to pager overruns

commit 17b572e82032bc246324ce136696656b66d4e3f1 upstream.

It is possible to miss data when using the kdb pager.  The kdb pager
does not pay attention to the maximum column constraint of the screen
or serial terminal.  This result is not incrementing the shown lines
correctly and the pager will print more lines that fit on the screen.
Obviously that is less than useful when using a VGA console where you
cannot scroll back.

The pager will now look at the kdb_buffer string to see how many
characters are printed.  It might not be perfect considering you can
output ASCII that might move the cursor position, but it is a
substantially better approximation for viewing dmesg and trace logs.

This also means that the vt screen needs to set the kdb COLUMNS
variable.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c
kernel/debug/kdb/kdb_io.c