aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authormokopatches <mokopatches@openmoko.org>2008-11-19 17:03:17 +0000
committerwarmcat <andy@warmcat.com>2008-11-19 17:03:17 +0000
commit3c948e4702df9fd846633f71adb8a7912811834c (patch)
tree39df530bd602aa48125b5828926d2a625c979394 /include
parent33e6d7ec683f0d56868fc01cf052d5765081fd6d (diff)
config-nr-tty-devices.patch
Diffstat (limited to 'include')
-rw-r--r--include/linux/vt.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/vt.h b/include/linux/vt.h
index 02c1c028877..2ba4d211e30 100644
--- a/include/linux/vt.h
+++ b/include/linux/vt.h
@@ -18,8 +18,19 @@ extern int unregister_vt_notifier(struct notifier_block *nb);
* resizing).
*/
#define MIN_NR_CONSOLES 1 /* must be at least 1 */
+#if (CONFIG_NR_TTY_DEVICES < 4)
+/* Lower Limit */
+#define MAX_NR_CONSOLES 4 /* serial lines start at 64 */
+#define MAX_NR_USER_CONSOLES 4 /* must be root to allocate above this */
+#elif (CONFIG_NR_TTY_DEVICES > 63)
+/* Upper Limit */
#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
+#else
+/* They chose a sensible number */
+#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES
+#define MAX_NR_USER_CONSOLES CONFIG_NR_TTY_DEVICES
+#endif
/* Note: the ioctl VT_GETSTATE does not work for
consoles 16 and higher (since it returns a short) */