summaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-10-18 22:26:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 16:50:54 -0700
commit6c633f27ccf783e9a782b84e34aeaeb7949a3359 (patch)
tree66180a876a5ff6c7d81672b725288ff4c83f80d9 /drivers/tty/n_tty.c
parent3383427a7b325e50af03d6f42b9587ca66d941a6 (diff)
downloadop-kernel-dev-6c633f27ccf783e9a782b84e34aeaeb7949a3359.zip
op-kernel-dev-6c633f27ccf783e9a782b84e34aeaeb7949a3359.tar.gz
TTY: audit, stop accessing tty->icount
This is a private member of n_tty. Stop accessing it. Instead, take is as an argument. This is needed to allow clean switch of the private members to a separate private structure of n_tty. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index ceae074..3ebab0c 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -76,7 +76,7 @@
static inline int tty_put_user(struct tty_struct *tty, unsigned char x,
unsigned char __user *ptr)
{
- tty_audit_add_data(tty, &x, 1);
+ tty_audit_add_data(tty, &x, 1, tty->icanon);
return put_user(x, ptr);
}
@@ -1644,7 +1644,8 @@ static int copy_from_read_buf(struct tty_struct *tty,
n -= retval;
is_eof = n == 1 &&
tty->read_buf[tty->read_tail] == EOF_CHAR(tty);
- tty_audit_add_data(tty, &tty->read_buf[tty->read_tail], n);
+ tty_audit_add_data(tty, &tty->read_buf[tty->read_tail], n,
+ tty->icanon);
spin_lock_irqsave(&tty->read_lock, flags);
tty->read_tail = (tty->read_tail + n) & (N_TTY_BUF_SIZE-1);
tty->read_cnt -= n;
OpenPOWER on IntegriCloud