aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorDaniel Thompson <[email protected]>2014-07-16 14:30:13 +0100
committerGreg Kroah-Hartman <[email protected]>2014-07-17 18:19:40 -0700
commitc8b29f049eb2645dd21e40a6613c09f15c731650 (patch)
tree1068dcafa1bcbe2959c4696fa8c010e9cdc7b51a /net/lapb/lapb_subr.c
parent3d1c90d48cbe335a47a6a5a05ff731a86eacf6fb (diff)
tty: kgdb_nmi: Automatically manage tty enable
At present it is not possible to boot with the ttyNMI0 console treating character input normally, instead character input triggers a prompt telling the user how to trigger the knock detector and enter the debugger. To use the console normally requires that kdb be entered and the nmi_console command be used to enable the console (or if only kgdb is present then gdb must directly manipulate the value of kgdb_nmi_tty_enabled). This patch automates the management of kgdb_nmi_tty_enabled by keeping track of the number of file handles that are open for reading and using that to determine how to tty should operate. The approach means that: 1. Behaviour before init starts is unchanged. 2. If the userspace runs a getty or some other interactive process on /dev/console (or explicitly on /dev/ttyNMI0) the tty will treat character input like any other tty. 3. If the userspace doesn't use /dev/console or if it uses /dev/console only to log messages (O_WRONLY) then the user prompt is retained. Signed-off-by: Daniel Thompson <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: [email protected] Cc: Jason Wessel <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions