From: Ben Gras Date: Thu, 29 Jan 2009 15:06:40 +0000 (+0000) Subject: If serial debugging in the boot monitor / kernel is enabled, don't touch X-Git-Tag: v3.1.4~120 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=80f5eea8b80041c3a77fe94091282399c0ac9ff2;p=minix.git If serial debugging in the boot monitor / kernel is enabled, don't touch the serial line in use for it (mostly so that input isn't eaten by tty). --- diff --git a/drivers/tty/rs232.c b/drivers/tty/rs232.c index 8bc70599f..aed377b25 100644 --- a/drivers/tty/rs232.c +++ b/drivers/tty/rs232.c @@ -445,9 +445,19 @@ tty_t *tp; /* which TTY */ int line; port_t this_8250; int irq; + char l[10]; /* Associate RS232 and TTY structures. */ line = tp - &tty_table[NR_CONS]; + + /* See if kernel debugging is enabled; if so, don't initialize this + * serial line, making tty not look at the irq and returning ENXIO + * for all requests on it from userland. (The kernel will use it.) + */ + if(env_get_param(SERVARNAME, l, sizeof(l)-1) == OK && atoi(l) == line) { + return; + } + rs = tp->tty_priv = &rs_lines[line]; rs->tty = tp;