diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-08-15 06:25:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:51:09 -0400 |
commit | dc8c85871c9728c5fddca6854a191fd41eb9438c (patch) | |
tree | d56e7a4c4d797d6696f24ef374cfd35865d5a5dd /drivers | |
parent | 45aaae9c51d768d5a8fd53fb372b1eb714f37691 (diff) |
PTY: add kernel parameter to overwrite legacy pty count
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/pty.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index de14aea34e11..73de77105fea 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -248,14 +248,19 @@ static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file, | |||
248 | return -ENOIOCTLCMD; | 248 | return -ENOIOCTLCMD; |
249 | } | 249 | } |
250 | 250 | ||
251 | static int legacy_count = CONFIG_LEGACY_PTY_COUNT; | ||
252 | module_param(legacy_count, int, 0); | ||
253 | |||
251 | static void __init legacy_pty_init(void) | 254 | static void __init legacy_pty_init(void) |
252 | { | 255 | { |
256 | if (legacy_count <= 0) | ||
257 | return; | ||
253 | 258 | ||
254 | pty_driver = alloc_tty_driver(NR_PTYS); | 259 | pty_driver = alloc_tty_driver(legacy_count); |
255 | if (!pty_driver) | 260 | if (!pty_driver) |
256 | panic("Couldn't allocate pty driver"); | 261 | panic("Couldn't allocate pty driver"); |
257 | 262 | ||
258 | pty_slave_driver = alloc_tty_driver(NR_PTYS); | 263 | pty_slave_driver = alloc_tty_driver(legacy_count); |
259 | if (!pty_slave_driver) | 264 | if (!pty_slave_driver) |
260 | panic("Couldn't allocate pty slave driver"); | 265 | panic("Couldn't allocate pty slave driver"); |
261 | 266 | ||