lkml.org 
[lkml]   [1997]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectBug in drivers/char/vt.c
Date
From

Hi,

I guess I found a bug in the kernel. (My first!).
The consoles reported back in vstat->v_state on the VT_GETSTATE request
are shifted by one, and tty0 is reported twice. (Please don't tell me
POSIX requires this <G>).

Here's the patch: (against 2.0.30)

--- vt.c.orig Wed Aug 20 20:27:19 1997
+++ vt.c Wed Aug 20 20:27:49 1997
@@ -750,5 +750,5 @@
put_user(fg_console + 1, &vtstat->v_active);
state = 1; /* /dev/tty0 is always open */
- for (i = 0, mask = 2; i < MAX_NR_CONSOLES && mask; ++i, mask <<= 1)
+ for (i = 1, mask = 2; i < MAX_NR_CONSOLES && mask; ++i, mask <<= 1)
if (VT_IS_IN_USE(i))
state |= mask;
Han Holl


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:2.083 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site