vt.c: unimap changes to (fg_?)console

From: Kurt Garloff (garloff@suse.de)
Date: Mon May 07 2001 - 05:37:09 EST


Hi Linus, Alan, Andries,

if you open /dev/tty4 and change the font via ioctl(KDFONTOP), it will be
applied to the opened console, i.e. tty4. Then you set the corresponding
unicodemap via PIO_UNIMAPCLR and PIO_UNIMAP ioctls. Those get applied to the
current foreground console. Which is inconsistent.

Looking at vt.c: vt_ioctl(), the situation is a bit messy: Some ioctls don't
explicitly specify a tty (probably not needed, as some settings are global),
some apply to fg_console, some apply to the opened console which is
((struct vt_struct*)tty->driver_data)->vc_num.

I would appreciate, if somebody with more knowledge could have a look and
check whether this is all correct. At least for the above case, it's not.
(Andries, I would appreciate if you have a look; you understand much more of
it than I do.)

I attach a patch to fix the specific problem reported above. It applies to
both 2.4.4 and 2.2.19. ioctl(PIO_UNIMAP[CLR]) is applied to the opened
console now instead of fg_console.
Please apply until somebody comes with a complete vt.c cleanup!

If you want to test yourself: I also have a patch against kbd-1.05
which allows you to use setfont -c /dev/ttyXX to specify which terminal you
want to. I already sent it to Andries.

Regards,

-- 
Kurt Garloff  <garloff@suse.de>                          Eindhoven, NL
GPG key: See mail header, key servers         Linux kernel development
SuSE GmbH, Nuernberg, FRG                               SCSI, Security



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:24 EST