summaryrefslogtreecommitdiffstats
path: root/sys/dev/snp/snp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/snp/snp.c')
-rw-r--r--sys/dev/snp/snp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 7563686..e30b293 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.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
OpenPOWER on IntegriCloud