X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fpty.c;fp=drivers%2Fchar%2Fpty.c;h=9b5a2c0e7008c82183649e6006784088ceabd220;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=34dd4c38110e060f6bdfd866d0aa2bdb41994d08;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/char/pty.c b/drivers/char/pty.c index 34dd4c381..9b5a2c0e7 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -11,6 +11,7 @@ * */ +#include #include /* For EXPORT_SYMBOL */ #include @@ -23,6 +24,7 @@ #include #include #include +#include #include #include @@ -99,7 +101,7 @@ static void pty_unthrottle(struct tty_struct * tty) * * FIXME: Our pty_write method is called with our ldisc lock held but * not our partners. We can't just take the other one blindly without - * risking deadlocks. + * risking deadlocks. There is also the small matter of TTY_DONT_FLIP */ static int pty_write(struct tty_struct * tty, const unsigned char *buf, int count) { @@ -263,6 +265,7 @@ static void __init legacy_pty_init(void) pty_driver->owner = THIS_MODULE; pty_driver->driver_name = "pty_master"; pty_driver->name = "pty"; + pty_driver->devfs_name = "pty/m"; pty_driver->major = PTY_MASTER_MAJOR; pty_driver->minor_start = 0; pty_driver->type = TTY_DRIVER_TYPE_PTY; @@ -280,6 +283,7 @@ static void __init legacy_pty_init(void) pty_slave_driver->owner = THIS_MODULE; pty_slave_driver->driver_name = "pty_slave"; pty_slave_driver->name = "ttyp"; + pty_slave_driver->devfs_name = "pty/s"; pty_slave_driver->major = PTY_SLAVE_MAJOR; pty_slave_driver->minor_start = 0; pty_slave_driver->type = TTY_DRIVER_TYPE_PTY; @@ -347,6 +351,7 @@ static int pty_unix98_ioctl(struct tty_struct *tty, struct file *file, static void __init unix98_pty_init(void) { + devfs_mk_dir("pts"); ptm_driver = alloc_tty_driver(NR_UNIX98_PTY_MAX); if (!ptm_driver) panic("Couldn't allocate Unix98 ptm driver"); @@ -367,7 +372,7 @@ static void __init unix98_pty_init(void) ptm_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; ptm_driver->init_termios.c_lflag = 0; ptm_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | - TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; + TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM; ptm_driver->other = pts_driver; tty_set_operations(ptm_driver, &pty_ops); ptm_driver->ioctl = pty_unix98_ioctl; @@ -382,7 +387,7 @@ static void __init unix98_pty_init(void) pts_driver->init_termios = tty_std_termios; pts_driver->init_termios.c_cflag = B38400 | CS8 | CREAD; pts_driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_REAL_RAW | - TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_DEVPTS_MEM; + TTY_DRIVER_NO_DEVFS | TTY_DRIVER_DEVPTS_MEM; pts_driver->other = ptm_driver; tty_set_operations(pts_driver, &pty_ops);