diff options
author | hselasky <hselasky@FreeBSD.org> | 2012-03-29 15:47:29 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2012-03-29 15:47:29 +0000 |
commit | fc9fab80c6a39b7d3c66495c21ebf5bba43ad393 (patch) | |
tree | 66db1b6a0eba64ec2f3df51ea98349adf2e83a17 /sys | |
parent | c5537d1e1c9e449bef1c2442e941758f27d9bca9 (diff) | |
download | FreeBSD-src-fc9fab80c6a39b7d3c66495c21ebf5bba43ad393.zip FreeBSD-src-fc9fab80c6a39b7d3c66495c21ebf5bba43ad393.tar.gz |
Move tty_opened_ns() into syscons.c which is currently the
only client of this macro.
Suggested by: ed @
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/syscons/syscons.c | 3 | ||||
-rw-r--r-- | sys/sys/tty.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 9d125d8..01b1150 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -86,6 +86,9 @@ __FBSDID("$FreeBSD$"); #define KEYCODE_BS 0x0e /* "<-- Backspace" key, XXX */ +/* NULL-safe version of "tty_opened()" */ +#define tty_opened_ns(tp) ((tp) != NULL && tty_opened(tp)) + typedef struct default_attr { int std_color; /* normal hardware color */ int rev_color; /* reverse hardware color */ diff --git a/sys/sys/tty.h b/sys/sys/tty.h index a25bf88..42f264b 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -197,8 +197,6 @@ void tty_hiwat_in_block(struct tty *tp); void tty_hiwat_in_unblock(struct tty *tp); dev_t tty_udev(struct tty *tp); #define tty_opened(tp) ((tp)->t_flags & TF_OPENED) -/* NULL-safe version of "tty_opened()" */ -#define tty_opened_ns(tp) ((tp) != NULL && tty_opened(tp)) #define tty_gone(tp) ((tp)->t_flags & TF_GONE) #define tty_softc(tp) ((tp)->t_devswsoftc) #define tty_devname(tp) devtoname((tp)->t_dev) |