diff options
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r-- | drivers/tty/tty_io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index a3eba7f359ed..739ea86c1cf1 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c | |||
@@ -2687,6 +2687,11 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
2687 | case TIOCNXCL: | 2687 | case TIOCNXCL: |
2688 | clear_bit(TTY_EXCLUSIVE, &tty->flags); | 2688 | clear_bit(TTY_EXCLUSIVE, &tty->flags); |
2689 | return 0; | 2689 | return 0; |
2690 | case TIOCGEXCL: | ||
2691 | { | ||
2692 | int excl = test_bit(TTY_EXCLUSIVE, &tty->flags); | ||
2693 | return put_user(excl, (int __user *)p); | ||
2694 | } | ||
2690 | case TIOCNOTTY: | 2695 | case TIOCNOTTY: |
2691 | if (current->signal->tty != tty) | 2696 | if (current->signal->tty != tty) |
2692 | return -ENOTTY; | 2697 | return -ENOTTY; |