diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-01-09 21:35:21 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-27 15:13:28 -0800 |
commit | e802ca0e1892865acdde90f1aaed37333c5660c2 (patch) | |
tree | 900e6c7b7f1d99f9a90abf90fc4853dda47c1a30 | |
parent | de5583d670a8b10f157fdcc7afaddfd1ec423a69 (diff) | |
download | lwn-e802ca0e1892865acdde90f1aaed37333c5660c2.tar.gz lwn-e802ca0e1892865acdde90f1aaed37333c5660c2.zip |
tty: Move tty_check_change() helper
Move is_ignored() to drivers/tty/tty_io.c and re-declare in file
scope.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/n_tty.c | 6 | ||||
-rw-r--r-- | drivers/tty/tty_io.c | 6 | ||||
-rw-r--r-- | include/linux/tty.h | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index dae628f19912..f4555a261420 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -1763,12 +1763,6 @@ static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp, return n_tty_receive_buf_common(tty, cp, fp, count, 1); } -int is_ignored(int sig) -{ - return (sigismember(¤t->blocked, sig) || - current->sighand->action[sig-1].sa.sa_handler == SIG_IGN); -} - /** * n_tty_set_termios - termios data changed * @tty: terminal diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 798acb690092..e8996fc3ff1c 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -381,6 +381,12 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line) EXPORT_SYMBOL_GPL(tty_find_polling_driver); #endif +static int is_ignored(int sig) +{ + return (sigismember(¤t->blocked, sig) || + current->sighand->action[sig-1].sa.sa_handler == SIG_IGN); +} + /** * tty_check_change - check for POSIX terminal changes * @tty: tty to check diff --git a/include/linux/tty.h b/include/linux/tty.h index 26a9b4b3efe9..ba7120dccccb 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -445,7 +445,6 @@ extern int tty_throttle_safe(struct tty_struct *tty); extern int tty_unthrottle_safe(struct tty_struct *tty); extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); extern int is_current_pgrp_orphaned(void); -extern int is_ignored(int sig); extern void tty_hangup(struct tty_struct *tty); extern void tty_vhangup(struct tty_struct *tty); extern int tty_hung_up_p(struct file *filp); |