diff options
| author | 2002-05-07 20:23:42 +0000 | |
|---|---|---|
| committer | 2002-05-07 20:23:42 +0000 | |
| commit | 0c2a5570ae44e9eb535e8f04cb50e72e78d76bed (patch) | |
| tree | 4f9200a899160b9b8eb886a1ff748709186622d7 /sys/compat/linux/linux_termios.c | |
| parent | Fix uvisor for what's currently in the tree (diff) | |
| download | wireguard-openbsd-0c2a5570ae44e9eb535e8f04cb50e72e78d76bed.tar.xz wireguard-openbsd-0c2a5570ae44e9eb535e8f04cb50e72e78d76bed.zip | |
support TIOCLINUX ioctl
- from NetBSD
Diffstat (limited to 'sys/compat/linux/linux_termios.c')
| -rw-r--r-- | sys/compat/linux/linux_termios.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_termios.c b/sys/compat/linux/linux_termios.c index 1603d1f77dd..67dd03dc4f9 100644 --- a/sys/compat/linux/linux_termios.c +++ b/sys/compat/linux/linux_termios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_termios.c,v 1.12 2002/03/14 01:26:50 millert Exp $ */ +/* $OpenBSD: linux_termios.c,v 1.13 2002/05/07 20:23:42 jasoni Exp $ */ /* $NetBSD: linux_termios.c,v 1.3 1996/04/05 00:01:54 christos Exp $ */ /* @@ -457,6 +457,7 @@ linux_ioctl_termios(p, v, retval) caddr_t sg; int idat; struct sys_ioctl_args ia; + char tioclinux; int error = 0; fdp = p->p_fd; @@ -589,6 +590,30 @@ linux_ioctl_termios(p, v, retval) } error = (*fp->f_ops->fo_ioctl)(fp, TIOCSETD, (caddr_t)&idat, p); goto out; + case LINUX_TIOCLINUX: + error = copyin(SCARG(uap, data), &tioclinux, sizeof tioclinux); + if (error != 0) + goto out; + switch (tioclinux) { + case LINUX_TIOCLINUX_KERNMSG: + /* + * XXX needed to not fail for some things. Could + * try to use TIOCCONS, but the char argument + * specifies the VT #, not an fd. + */ + goto out; + case LINUX_TIOCLINUX_COPY: + case LINUX_TIOCLINUX_PASTE: + case LINUX_TIOCLINUX_UNBLANK: + case LINUX_TIOCLINUX_LOADLUT: + case LINUX_TIOCLINUX_READSHIFT: + case LINUX_TIOCLINUX_READMOUSE: + case LINUX_TIOCLINUX_VESABLANK: + case LINUX_TIOCLINUX_CURCONS: /* could use VT_GETACTIVE */ + error = EINVAL; + goto out; + } + break; case LINUX_TIOCGWINSZ: SCARG(&ia, com) = TIOCGWINSZ; break; |
