diff options
Diffstat (limited to 'sys/dev/snp/snp.c')
| -rw-r--r-- | sys/dev/snp/snp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index 1c02660bec1d..84260182265c 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -60,6 +60,8 @@ SX_SYSINIT(snp_register_lock, &snp_register_lock, #define SNP_UNLOCK() sx_xunlock(&snp_register_lock) #endif +#define SNPGTYY_32DEV _IOR('T', 89, uint32_t) + /* * There is no need to have a big input buffer. In most typical setups, * we won't inject much data into the TTY, because users can't type @@ -275,6 +277,12 @@ snp_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flags, else *(dev_t *)data = tty_udev(ss->snp_tty); return (0); + case SNPGTYY_32DEV: + if (ss->snp_tty == NULL) + *(uint32_t *)data = -1; + else + *(uint32_t *)data = tty_udev(ss->snp_tty); /* trunc */ + return (0); case FIONREAD: tp = ss->snp_tty; if (tp != NULL) { |
