From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org,
Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH v2 4/6] tty: Move tty_check_change() helper
Date: Sat, 9 Jan 2016 21:35:21 -0800 [thread overview]
Message-ID: <1452404123-9024-5-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <1452404123-9024-1-git-send-email-peter@hurleysoftware.com>
Move is_ignored() to drivers/tty/tty_io.c and re-declare in file
scope.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/n_tty.c | 6 ------
drivers/tty/tty_io.c | 6 ++++++
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 5315d1a..8272069 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1754,12 +1754,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 8b4e7cd..b89c0a5 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 fecfe92..a01f9dd 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);
--
2.7.0
next prev parent reply other threads:[~2016-01-10 5:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-28 2:38 [PATCH 0/6] Peter Hurley
2015-11-28 2:38 ` [PATCH 1/6] tty: Unexport system-wide tty_mutex Peter Hurley
2015-11-28 2:38 ` [PATCH 2/6] tty: Eliminate global symbol tty_ldisc_N_TTY Peter Hurley
2015-11-28 2:38 ` [PATCH 3/6] tty: Remove declarations to non-existent functions Peter Hurley
2015-11-28 2:38 ` [PATCH 4/6] tty: Move tty_check_change() helper Peter Hurley
2015-11-28 2:38 ` [PATCH 5/6] tty: Remove unreferenced tty flags macro TTY_DEBUG Peter Hurley
2015-11-28 2:38 ` [PATCH 6/6] tty: Make tty_files_lock per-tty Peter Hurley
2016-01-10 5:35 ` [PATCH v2 0/6] tty globals cleanup (cont'd) Peter Hurley
2016-01-10 5:35 ` [PATCH v2 1/6] tty: Unexport system-wide tty_mutex Peter Hurley
2016-01-10 5:35 ` [PATCH v2 2/6] tty: Eliminate global symbol tty_ldisc_N_TTY Peter Hurley
2016-01-10 5:35 ` [PATCH v2 3/6] tty: Remove declarations to non-existent functions Peter Hurley
2016-01-10 5:35 ` Peter Hurley [this message]
2016-01-10 5:35 ` [PATCH v2 5/6] tty: Remove unreferenced tty flags macro TTY_DEBUG Peter Hurley
2016-01-10 5:35 ` [PATCH v2 6/6] tty: Make tty_files_lock per-tty Peter Hurley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452404123-9024-5-git-send-email-peter@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox