diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/char/pty.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r-- | drivers/char/pty.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 62f282e67638..d83a43130df4 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | #include <linux/bitops.h> | 30 | #include <linux/bitops.h> |
31 | #include <linux/devpts_fs.h> | 31 | #include <linux/devpts_fs.h> |
32 | #include <linux/slab.h> | ||
32 | 33 | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | 35 | ||
@@ -220,7 +221,7 @@ static void pty_set_termios(struct tty_struct *tty, | |||
220 | * @tty: tty being resized | 221 | * @tty: tty being resized |
221 | * @ws: window size being set. | 222 | * @ws: window size being set. |
222 | * | 223 | * |
223 | * Update the termios variables and send the neccessary signals to | 224 | * Update the termios variables and send the necessary signals to |
224 | * peform a terminal resize correctly | 225 | * peform a terminal resize correctly |
225 | */ | 226 | */ |
226 | 227 | ||
@@ -431,30 +432,25 @@ static struct cdev ptmx_cdev; | |||
431 | 432 | ||
432 | static struct ctl_table pty_table[] = { | 433 | static struct ctl_table pty_table[] = { |
433 | { | 434 | { |
434 | .ctl_name = PTY_MAX, | ||
435 | .procname = "max", | 435 | .procname = "max", |
436 | .maxlen = sizeof(int), | 436 | .maxlen = sizeof(int), |
437 | .mode = 0644, | 437 | .mode = 0644, |
438 | .data = &pty_limit, | 438 | .data = &pty_limit, |
439 | .proc_handler = &proc_dointvec_minmax, | 439 | .proc_handler = proc_dointvec_minmax, |
440 | .strategy = &sysctl_intvec, | ||
441 | .extra1 = &pty_limit_min, | 440 | .extra1 = &pty_limit_min, |
442 | .extra2 = &pty_limit_max, | 441 | .extra2 = &pty_limit_max, |
443 | }, { | 442 | }, { |
444 | .ctl_name = PTY_NR, | ||
445 | .procname = "nr", | 443 | .procname = "nr", |
446 | .maxlen = sizeof(int), | 444 | .maxlen = sizeof(int), |
447 | .mode = 0444, | 445 | .mode = 0444, |
448 | .data = &pty_count, | 446 | .data = &pty_count, |
449 | .proc_handler = &proc_dointvec, | 447 | .proc_handler = proc_dointvec, |
450 | }, { | 448 | }, |
451 | .ctl_name = 0 | 449 | {} |
452 | } | ||
453 | }; | 450 | }; |
454 | 451 | ||
455 | static struct ctl_table pty_kern_table[] = { | 452 | static struct ctl_table pty_kern_table[] = { |
456 | { | 453 | { |
457 | .ctl_name = KERN_PTY, | ||
458 | .procname = "pty", | 454 | .procname = "pty", |
459 | .mode = 0555, | 455 | .mode = 0555, |
460 | .child = pty_table, | 456 | .child = pty_table, |
@@ -464,7 +460,6 @@ static struct ctl_table pty_kern_table[] = { | |||
464 | 460 | ||
465 | static struct ctl_table pty_root_table[] = { | 461 | static struct ctl_table pty_root_table[] = { |
466 | { | 462 | { |
467 | .ctl_name = CTL_KERN, | ||
468 | .procname = "kernel", | 463 | .procname = "kernel", |
469 | .mode = 0555, | 464 | .mode = 0555, |
470 | .child = pty_kern_table, | 465 | .child = pty_kern_table, |
@@ -665,7 +660,7 @@ static int __ptmx_open(struct inode *inode, struct file *filp) | |||
665 | if (!retval) | 660 | if (!retval) |
666 | return 0; | 661 | return 0; |
667 | out1: | 662 | out1: |
668 | tty_release_dev(filp); | 663 | tty_release(inode, filp); |
669 | return retval; | 664 | return retval; |
670 | out: | 665 | out: |
671 | devpts_kill_index(inode, index); | 666 | devpts_kill_index(inode, index); |