diff options
Diffstat (limited to 'drivers/char/console.c')
-rw-r--r-- | drivers/char/console.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/console.c b/drivers/char/console.c index db165915c..d0503cdcb 100644 --- a/drivers/char/console.c +++ b/drivers/char/console.c @@ -33,7 +33,7 @@ * APM screenblank bug fixed Takashi Manabe <manabe@roy.dsl.tutics.tut.jp> * * Merge with the abstract console driver by Geert Uytterhoeven - * <Geert.Uytterhoeven@cs.kuleuven.ac.be>, Jan 1997. + * <geert@linux-m68k.org>, Jan 1997. * * Original m68k console driver modifications by * @@ -1984,7 +1984,7 @@ void vt_console_print(struct console *co, const char * b, unsigned count) static unsigned long printing = 0; const ushort *start; ushort cnt = 0; - ushort myx = x; + ushort myx; /* console busy or not yet initialized */ if (!printable || test_and_set_bit(0, &printing)) @@ -1993,6 +1993,10 @@ void vt_console_print(struct console *co, const char * b, unsigned count) if (kmsg_redirect && vc_cons_allocated(kmsg_redirect - 1)) currcons = kmsg_redirect - 1; + /* read `x' only after setting currecons properly (otherwise + the `x' macro will read the x of the foreground console). */ + myx = x; + if (!vc_cons_allocated(currcons)) { /* impossible */ printk("vt_console_print: tty %d not allocated ??\n", currcons+1); |