Commit a913bc76 authored by Al Viro's avatar Al Viro

tty_ioctl(): drop FIONBIO handling

That code had been live for 11 weeks back in 1992, but it had been 26 years
since sys_ioctl() began handling FIONBIO on its own.  Time to to bury the body,
already...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e2112038
...@@ -2288,34 +2288,6 @@ static int tioccons(struct file *file) ...@@ -2288,34 +2288,6 @@ static int tioccons(struct file *file)
return 0; return 0;
} }
/**
* fionbio - non blocking ioctl
* @file: file to set blocking value
* @p: user parameter
*
* Historical tty interfaces had a blocking control ioctl before
* the generic functionality existed. This piece of history is preserved
* in the expected tty API of posix OS's.
*
* Locking: none, the open file handle ensures it won't go away.
*/
static int fionbio(struct file *file, int __user *p)
{
int nonblock;
if (get_user(nonblock, p))
return -EFAULT;
spin_lock(&file->f_lock);
if (nonblock)
file->f_flags |= O_NONBLOCK;
else
file->f_flags &= ~O_NONBLOCK;
spin_unlock(&file->f_lock);
return 0;
}
/** /**
* tiocsetd - set line discipline * tiocsetd - set line discipline
* @tty: tty device * @tty: tty device
...@@ -2562,8 +2534,6 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -2562,8 +2534,6 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return tiocswinsz(real_tty, p); return tiocswinsz(real_tty, p);
case TIOCCONS: case TIOCCONS:
return real_tty != tty ? -EINVAL : tioccons(file); return real_tty != tty ? -EINVAL : tioccons(file);
case FIONBIO:
return fionbio(file, p);
case TIOCEXCL: case TIOCEXCL:
set_bit(TTY_EXCLUSIVE, &tty->flags); set_bit(TTY_EXCLUSIVE, &tty->flags);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment