Skip to content

Commit e802ca0

Browse files
peterhurleygregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent de5583d commit e802ca0

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

drivers/tty/n_tty.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,12 +1763,6 @@ static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp,
17631763
return n_tty_receive_buf_common(tty, cp, fp, count, 1);
17641764
}
17651765

1766-
int is_ignored(int sig)
1767-
{
1768-
return (sigismember(&current->blocked, sig) ||
1769-
current->sighand->action[sig-1].sa.sa_handler == SIG_IGN);
1770-
}
1771-
17721766
/**
17731767
* n_tty_set_termios - termios data changed
17741768
* @tty: terminal

drivers/tty/tty_io.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,12 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)
381381
EXPORT_SYMBOL_GPL(tty_find_polling_driver);
382382
#endif
383383

384+
static int is_ignored(int sig)
385+
{
386+
return (sigismember(&current->blocked, sig) ||
387+
current->sighand->action[sig-1].sa.sa_handler == SIG_IGN);
388+
}
389+
384390
/**
385391
* tty_check_change - check for POSIX terminal changes
386392
* @tty: tty to check

include/linux/tty.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ extern int tty_throttle_safe(struct tty_struct *tty);
445445
extern int tty_unthrottle_safe(struct tty_struct *tty);
446446
extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws);
447447
extern int is_current_pgrp_orphaned(void);
448-
extern int is_ignored(int sig);
449448
extern void tty_hangup(struct tty_struct *tty);
450449
extern void tty_vhangup(struct tty_struct *tty);
451450
extern int tty_hung_up_p(struct file *filp);

0 commit comments

Comments
 (0)