FIX: mdacon.c console number weirdness

st0136@aixrs1.hrz.uni-essen.de
Sat, 15 May 1999 02:14:58 +0200 (CEST)


Linux kernel 2.2.9

Problem:

The range of consoles to switch to mda consoles is specified by
mda_first_vc and mda_last_vc. The consoles acutally switched and used for
mda are one above the specified consoles.

Example:

$ modprobe mdacon mda_first_vc=13 mda_last_vc=16
May 14 23:34:24 spiral kernel: mdacon: Hercules with 8K of memory detected.
May 14 23:34:24 spiral kernel: Console: switching consoles 14-17 to MDA-2
^^^^^

The consoles 14-17 are those switched to by pressing ALT Gr-F2 to F5.
Those are /dev/tty14 to /dev/tty17. I am sure we want /dev/tty13 to
/dev/tty16 switched to by ALT Gr-F1 to F5.

Fix:

take_over_console is called with first and last console as specified by
mda_first_vc and mda_last_vc though I think it counts the consoles from 0
and not from 1. So we have to substract the parameters by 1.

--- /usr/src/linux/drivers/video/mdacon.c Sat May 15 01:09:19 1999
+++ mdacon.c Sat May 15 01:20:20 1999
@@ -597,7 +597,7 @@
if (mda_first_vc > mda_last_vc)
return;

- take_over_console(&mda_con, mda_first_vc, mda_last_vc, 0);
+ take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0);
}

#ifdef MODULE

-- 
Homepage: http://www.raoul.home.pages.de/
I'm using pre-dinosaur hardware.

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