From 44d8a3b227a87ee637875d35db13833e1214f3f0 Mon Sep 17 00:00:00 2001 From: Paul Fulghum Date: Sat, 16 Jun 2007 10:15:55 -0700 Subject: [PATCH] --- yaml --- r: 57831 b: refs/heads/master c: 38ad2ed08d89a4b830a03131fa73e4ef3e98d9f4 h: refs/heads/master i: 57829: 5258cfc70cc03c80759fcbe9e6c407cb2899f32f 57827: 7b8013414b0589c9a4b80c996549f4365c62a529 57823: 3b4a44975d053c0cb9345af662d2500649d8fd07 v: v3 --- [refs] | 2 +- trunk/drivers/char/tty_io.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 9e080eceb2e6..a679cbe8b043 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4d2781731e846c2f01dd85e71883d120860c6dd +refs/heads/master: 38ad2ed08d89a4b830a03131fa73e4ef3e98d9f4 diff --git a/trunk/drivers/char/tty_io.c b/trunk/drivers/char/tty_io.c index 3752edc30c36..a96f26a63fa2 100644 --- a/trunk/drivers/char/tty_io.c +++ b/trunk/drivers/char/tty_io.c @@ -1173,8 +1173,14 @@ static unsigned int hung_up_tty_poll(struct file * filp, poll_table * wait) return POLLIN | POLLOUT | POLLERR | POLLHUP | POLLRDNORM | POLLWRNORM; } -static long hung_up_tty_ioctl(struct file * file, - unsigned int cmd, unsigned long arg) +static int hung_up_tty_ioctl(struct inode * inode, struct file * file, + unsigned int cmd, unsigned long arg) +{ + return cmd == TIOCSPGRP ? -ENOTTY : -EIO; +} + +static long hung_up_tty_compat_ioctl(struct file * file, + unsigned int cmd, unsigned long arg) { return cmd == TIOCSPGRP ? -ENOTTY : -EIO; } @@ -1222,8 +1228,8 @@ static const struct file_operations hung_up_tty_fops = { .read = hung_up_tty_read, .write = hung_up_tty_write, .poll = hung_up_tty_poll, - .unlocked_ioctl = hung_up_tty_ioctl, - .compat_ioctl = hung_up_tty_ioctl, + .ioctl = hung_up_tty_ioctl, + .compat_ioctl = hung_up_tty_compat_ioctl, .release = tty_release, };