1 From 615dc14d7d29e2ff36e1da3cbb421884137bb7eb Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Tue, 21 Jul 2009 12:51:00 +0200
4 Subject: [PATCH] 080-nr-tty-devices.patch
7 drivers/char/Kconfig | 12 ++++++++++++
8 include/linux/vt.h | 11 +++++++++++
9 2 files changed, 23 insertions(+), 0 deletions(-)
11 diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
12 index 6a06913..8e17552 100644
13 --- a/drivers/char/Kconfig
14 +++ b/drivers/char/Kconfig
15 @@ -66,6 +66,18 @@ config VT_CONSOLE
19 +config NR_TTY_DEVICES
20 + int "Maximum tty device number"
24 + This is the highest numbered device created in /dev. You will actually have
25 + NR_TTY_DEVICES+1 devices in /dev. The default is 63, which will result in
26 + 64 /dev entries. The lowest number you can set is 11, anything below that,
27 + and it will default to 11. 63 is also the upper limit so we don't overrun
28 + the serial consoles.
33 depends on VT && !S390 && !UML
34 diff --git a/include/linux/vt.h b/include/linux/vt.h
35 index 02c1c02..2ba4d21 100644
36 --- a/include/linux/vt.h
37 +++ b/include/linux/vt.h
38 @@ -18,8 +18,19 @@ extern int unregister_vt_notifier(struct notifier_block *nb);
41 #define MIN_NR_CONSOLES 1 /* must be at least 1 */
42 +#if (CONFIG_NR_TTY_DEVICES < 4)
44 +#define MAX_NR_CONSOLES 4 /* serial lines start at 64 */
45 +#define MAX_NR_USER_CONSOLES 4 /* must be root to allocate above this */
46 +#elif (CONFIG_NR_TTY_DEVICES > 63)
48 #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
49 #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
51 +/* They chose a sensible number */
52 +#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES
53 +#define MAX_NR_USER_CONSOLES CONFIG_NR_TTY_DEVICES
55 /* Note: the ioctl VT_GETSTATE does not work for
56 consoles 16 and higher (since it returns a short) */