1 --- a/include/linux/vt.h
2 +++ b/include/linux/vt.h
3 @@ -18,8 +18,19 @@ extern int unregister_vt_notifier(struct
6 #define MIN_NR_CONSOLES 1 /* must be at least 1 */
7 +#if (CONFIG_NR_TTY_DEVICES < 4)
9 +#define MAX_NR_CONSOLES 4 /* serial lines start at 64 */
10 +#define MAX_NR_USER_CONSOLES 4 /* must be root to allocate above this */
11 +#elif (CONFIG_NR_TTY_DEVICES > 63)
13 #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
14 #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
16 +/* They chose a sensible number */
17 +#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES
18 +#define MAX_NR_USER_CONSOLES CONFIG_NR_TTY_DEVICES
20 /* Note: the ioctl VT_GETSTATE does not work for
21 consoles 16 and higher (since it returns a short) */
23 --- a/drivers/char/Kconfig
24 +++ b/drivers/char/Kconfig
25 @@ -66,6 +66,18 @@ config VT_CONSOLE
29 +config NR_TTY_DEVICES
30 + int "Maximum tty device number"
34 + This is the highest numbered device created in /dev. You will actually have
35 + NR_TTY_DEVICES+1 devices in /dev. The default is 63, which will result in
36 + 64 /dev entries. The lowest number you can set is 11, anything below that,
37 + and it will default to 11. 63 is also the upper limit so we don't overrun
38 + the serial consoles.
43 depends on VT && !S390 && !UML