summaryrefslogtreecommitdiffstats
path: root/sys/compat
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/compat
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/compat')
-rw-r--r--sys/compat/linux/linux_ioctl.c40
1 files changed, 36 insertions, 4 deletions
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 <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