diff options
Diffstat (limited to 'sys/kern/tty_snoop.c')
-rw-r--r-- | sys/kern/tty_snoop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c index 7563686..e30b293 100644 --- a/sys/kern/tty_snoop.c +++ b/sys/kern/tty_snoop.c @@ -82,9 +82,9 @@ snpdevtotty (dev) struct cdevsw *cdp; cdp = devsw(dev); - if (cdp == NULL) - return (NULL); - return ((*cdp->d_devtotty)(dev)); + if (cdp && cdp->d_flags & D_TTY) + return (dev->si_tty); + return (NULL); } #define SNP_INPUT_BUF 5 /* This is even too much,the maximal |