Skip to content

Commit

Permalink
tty: Move tty_check_change() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Jan 27, 2016
1 parent de5583d commit e802ca0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 0 additions & 6 deletions drivers/tty/n_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(&current->blocked, sig) ||
current->sighand->action[sig-1].sa.sa_handler == SIG_IGN);
}

/**
* n_tty_set_termios - termios data changed
* @tty: terminal
Expand Down
6 changes: 6 additions & 0 deletions drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(&current->blocked, sig) ||
current->sighand->action[sig-1].sa.sa_handler == SIG_IGN);
}

/**
* tty_check_change - check for POSIX terminal changes
* @tty: tty to check
Expand Down
1 change: 0 additions & 1 deletion include/linux/tty.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e802ca0

Please sign in to comment.