aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r--drivers/char/pty.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 73de77105fea..706ff34728f1 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -318,7 +318,7 @@ int pty_limit = NR_UNIX98_PTY_DEFAULT;
318static int pty_limit_min = 0; 318static int pty_limit_min = 0;
319static int pty_limit_max = NR_UNIX98_PTY_MAX; 319static int pty_limit_max = NR_UNIX98_PTY_MAX;
320 320
321ctl_table pty_table[] = { 321static struct ctl_table pty_table[] = {
322 { 322 {
323 .ctl_name = PTY_MAX, 323 .ctl_name = PTY_MAX,
324 .procname = "max", 324 .procname = "max",
@@ -340,6 +340,27 @@ ctl_table pty_table[] = {
340 } 340 }
341}; 341};
342 342
343static struct ctl_table pty_kern_table[] = {
344 {
345 .ctl_name = KERN_PTY,
346 .procname = "pty",
347 .mode = 0555,
348 .child = pty_table,
349 },
350 {}
351};
352
353static struct ctl_table pty_root_table[] = {
354 {
355 .ctl_name = CTL_KERN,
356 .procname = "kernel",
357 .mode = 0555,
358 .child = pty_kern_table,
359 },
360 {}
361};
362
363
343static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, 364static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file,
344 unsigned int cmd, unsigned long arg) 365 unsigned int cmd, unsigned long arg)
345{ 366{
@@ -404,6 +425,7 @@ static void __init unix98_pty_init(void)
404 panic("Couldn't register Unix98 pts driver"); 425 panic("Couldn't register Unix98 pts driver");
405 426
406 pty_table[1].data = &ptm_driver->refcount; 427 pty_table[1].data = &ptm_driver->refcount;
428 register_sysctl_table(pty_root_table);
407} 429}
408#else 430#else
409static inline void unix98_pty_init(void) { } 431static inline void unix98_pty_init(void) { }