Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71155
b: refs/heads/master
c: 35834ca
h: refs/heads/master
i:
  71153: f8b5325
  71151: fffb552
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Oct 18, 2007
1 parent f08bf47 commit c7c20c7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25398a158d86b993fa5bf36f5a6752134b584d60
refs/heads/master: 35834ca1e4bda56d252aa2024a283d631f0e5ac6
24 changes: 23 additions & 1 deletion trunk/drivers/char/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ int pty_limit = NR_UNIX98_PTY_DEFAULT;
static int pty_limit_min = 0;
static int pty_limit_max = NR_UNIX98_PTY_MAX;

ctl_table pty_table[] = {
static struct ctl_table pty_table[] = {
{
.ctl_name = PTY_MAX,
.procname = "max",
Expand All @@ -340,6 +340,27 @@ ctl_table pty_table[] = {
}
};

static struct ctl_table pty_kern_table[] = {
{
.ctl_name = KERN_PTY,
.procname = "pty",
.mode = 0555,
.child = pty_table,
},
{}
};

static struct ctl_table pty_root_table[] = {
{
.ctl_name = CTL_KERN,
.procname = "kernel",
.mode = 0555,
.child = pty_kern_table,
},
{}
};


static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
{
Expand Down Expand Up @@ -404,6 +425,7 @@ static void __init unix98_pty_init(void)
panic("Couldn't register Unix98 pts driver");

pty_table[1].data = &ptm_driver->refcount;
register_sysctl_table(pty_root_table);
}
#else
static inline void unix98_pty_init(void) { }
Expand Down
11 changes: 0 additions & 11 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ static struct ctl_table fs_table[];
static struct ctl_table debug_table[];
static struct ctl_table dev_table[];
extern struct ctl_table random_table[];
#ifdef CONFIG_UNIX98_PTYS
extern struct ctl_table pty_table[];
#endif
#ifdef CONFIG_INOTIFY_USER
extern struct ctl_table inotify_table[];
#endif
Expand Down Expand Up @@ -534,14 +531,6 @@ static struct ctl_table kern_table[] = {
.mode = 0555,
.child = random_table,
},
#ifdef CONFIG_UNIX98_PTYS
{
.ctl_name = KERN_PTY,
.procname = "pty",
.mode = 0555,
.child = pty_table,
},
#endif
{
.ctl_name = KERN_OVERFLOWUID,
.procname = "overflowuid",
Expand Down

0 comments on commit c7c20c7

Please sign in to comment.