From 6185272d7d0d6fcd90042bff942253302dab8a80 Mon Sep 17 00:00:00 2001 From: jkh Date: Mon, 31 Aug 1998 06:55:02 +0000 Subject: Initial support for using linux X servers under emulation - to use an XFree86 server, users need to create the following links in their /compat/linux/dev directory (assuming kernel configured with 4 VTs). lrwxrwxrwx 1 root wheel 7 Aug 30 22:59 tty0 -> console lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty1 -> ttyv0 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty2 -> ttyv1 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty3 -> ttyv2 lrwxrwxrwx 1 root wheel 5 Aug 30 22:45 tty4 -> ttyv3 VT switching is still not yet supported. Attempting to switch VT currently will cause Xserver bus error. Submitted by: Chain Lee --- sys/compat/linux/linux_ioctl.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'sys/compat/linux/linux_ioctl.c') diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 4635088..f52c1d5 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_ioctl.c,v 1.24 1998/06/07 17:11:26 dfr Exp $ + * $Id: linux_ioctl.c,v 1.25 1998/07/29 16:43:00 bde Exp $ */ #include @@ -49,6 +49,8 @@ #include #include +#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG) + struct linux_termio { unsigned short c_iflag; unsigned short c_oflag; @@ -845,10 +847,15 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args) args->cmd = VT_GETMODE; return ioctl(p, (struct ioctl_args *)args); - case LINUX_VT_SETMODE: - + case LINUX_VT_SETMODE: + { + struct vt_mode *mode; args->cmd = VT_SETMODE; - return ioctl(p, (struct ioctl_args *)args); + mode = (struct vt_mode *)args->arg; + if (!ISSIGVALID(mode->frsig) && ISSIGVALID(mode->acqsig)) + mode->frsig = mode->acqsig; + return ioctl(p, (struct ioctl_args *)args, retval); + } case LINUX_VT_GETSTATE: @@ -887,7 +894,32 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args) return EINVAL; } } + + case LINUX_KDGETMODE: + args->cmd = KDGETMODE; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_KDSETMODE: + args->cmd = KDSETMODE; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_KDSETLED: + args->cmd = KDSETLED; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_KDGETLED: + args->cmd = KDGETLED; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_KIOCSOUND: + args->cmd = KIOCSOUND; + return ioctl(p, (struct ioctl_args *)args, retval); + + case LINUX_KDMKTONE: + args->cmd = KDMKTONE; + return ioctl(p, (struct ioctl_args *)args, retval); } + uprintf("LINUX: 'ioctl' fd=%d, typ=0x%x(%c), num=0x%x not implemented\n", args->fd, (u_int)((args->cmd & 0xffff00) >> 8), (int)((args->cmd & 0xffff00) >> 8), (u_int)(args->cmd & 0xff)); -- cgit v1.1