summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-08-31 06:55:02 +0000
committerjkh <jkh@FreeBSD.org>1998-08-31 06:55:02 +0000
commit6185272d7d0d6fcd90042bff942253302dab8a80 (patch)
tree9b922b748d7ffa0f6e1a564fb85b28a5d8fcdc3e /sys/i386
parent640c398571e82e828867187895d87186d1f8f5fb (diff)
downloadFreeBSD-src-6185272d7d0d6fcd90042bff942253302dab8a80.zip
FreeBSD-src-6185272d7d0d6fcd90042bff942253302dab8a80.tar.gz
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 <chain@110.net>
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/linux/linux.h16
-rw-r--r--sys/i386/linux/linux_ioctl.c40
2 files changed, 51 insertions, 5 deletions
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 5638c4c..1b67c96 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -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.h,v 1.19 1997/12/15 06:09:11 msmith Exp $
+ * $Id: linux.h,v 1.20 1998/02/13 07:34:52 bde Exp $
*/
#ifndef _I386_LINUX_LINUX_H_
@@ -167,8 +167,22 @@ struct trapframe;
#define LINUX_SIG_SETMASK 2
/* keyboard defines */
+#define LINUX_KIOCSOUND 0x4B2F
+#define LINUX_KDMKTONE 0x4B30
+#define LINUX_KDGETLED 0x4B31
+#define LINUX_KDSETLED 0x4B32
+#define LINUX_LED_SCR 0x01
+#define LINUX_LED_NUM 0x02
+#define LINUX_LED_CAP 0x04
+
#define LINUX_KDGKBMODE 0x4B44
#define LINUX_KDSKBMODE 0x4B45
+#define LINUX_KDSETMODE 0x4B3A
+#define LINUX_KDGETMODE 0x4B3B
+#define LINUX_KD_TEXT 0x0
+#define LINUX_KD_GRAPHICS 0x1
+#define LINUX_KD_TEXT0 0x2
+#define LINUX_KD_TEXT1 0x3
#define LINUX_KBD_RAW 0
#define LINUX_KBD_XLATE 1
diff --git a/sys/i386/linux/linux_ioctl.c b/sys/i386/linux/linux_ioctl.c
index 4635088..f52c1d5 100644
--- a/sys/i386/linux/linux_ioctl.c
+++ b/sys/i386/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 <sys/param.h>
@@ -49,6 +49,8 @@
#include <i386/linux/linux.h>
#include <i386/linux/linux_proto.h>
+#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));
OpenPOWER on IntegriCloud