public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Change number of tty devices
@ 2004-04-19 22:38 Jason Cox
  2004-04-20 12:38 ` [PATCH] " Jason Cox
  2004-04-21 20:14 ` James Simmons
  0 siblings, 2 replies; 10+ messages in thread
From: Jason Cox @ 2004-04-19 22:38 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 437 bytes --]

Hello all,

Often, I have wondered what the need for 64 tty devices in /dev is. I began tinkering with the code and am wondering why it's not user configurable. I came up with a quick patch to add it as an option under drivers/char/Kconfig. I also made a lower bound of 12. If this is an idea worth pursuing, please let me know. If this idea has been rejected before, I apologize. What do you think of this idea?

Thanks You,
Jason Cox


[-- Attachment #2: config_tty_devices.patch --]
[-- Type: application/octet-stream, Size: 1143 bytes --]

diff -urN linux-2.6.5/drivers/char/Kconfig linux-2.6.6_rc1-love1/drivers/char/Kconfig
--- linux-2.6.5/drivers/char/Kconfig	2004-04-19 16:01:50.006624287 -0500
+++ linux-2.6.6_rc1-love1/drivers/char/Kconfig	2004-04-19 16:39:01.877138133 -0500
@@ -57,6 +57,10 @@
 
 	  If unsure, say Y.
 
+config NR_TTY_DEVICES
+	int "Number of tty devices"
+	default 63
+
 config HW_CONSOLE
 	bool
 	depends on VT && !S390 && !UM
diff -urN linux-2.6.5/include/linux/tty.h linux-2.6.6_rc1-love1/include/linux/tty.h
--- linux-2.6.5/include/linux/tty.h	2004-04-19 11:04:19.000000000 -0500
+++ linux-2.6.6_rc1-love1/include/linux/tty.h	2004-04-19 16:52:19.782915029 -0500
@@ -10,8 +10,13 @@
  * resizing).
  */
 #define MIN_NR_CONSOLES 1       /* must be at least 1 */
+#if (CONFIG_NR_TTY_DEVICES < 11)
 #define MAX_NR_CONSOLES	63	/* serial lines start at 64 */
 #define MAX_NR_USER_CONSOLES 63	/* must be root to allocate above this */
+#else
+#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) */
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-25  7:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-19 22:38 Change number of tty devices Jason Cox
2004-04-20 12:38 ` [PATCH] " Jason Cox
2004-04-21 20:14 ` James Simmons
2004-04-22  2:24   ` Jason Cox
2004-04-22  8:33     ` Russell King
2004-04-25  3:15       ` James Simmons
2004-04-25  4:01         ` Horst von Brand
2004-04-25  7:33         ` Russell King
2004-04-25  3:19     ` James Simmons
2004-04-22  3:15   ` Jason Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox