diff options
author | Alan Cox <alan@linux.intel.com> | 2011-02-14 16:27:53 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 12:03:52 -0800 |
commit | 8d075b199b9a66ad90296f898f1f15c0ae1511b8 (patch) | |
tree | 2189c77c61210a4d24608f3fb49daf0bd6309f64 /include/linux/tty.h | |
parent | 94c2273d6c1b65eaaf2a6446c7147bdf6e5ae924 (diff) |
tty: add a helper for setting termios data from kernel side
This basically encapsulates the small bit of locking knowledge needed. While
we are at it make sure we blow up on any more abusers and unsafe misuses of
ioctl for this kind of stuff.
We change the function to return an argument as at some point it needs to
honour the POSIX 'I asked for changes but got none of them' error reporting
corner case.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index ef1e0123573..4e53d4641b3 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -448,6 +448,7 @@ extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud); extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); +extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); extern void tty_ldisc_deref(struct tty_ldisc *); |