Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev/wscons Pull up revision 1.10 (requested by mycr...
details: https://anonhg.NetBSD.org/src/rev/23eaf6e4f9c4
branches: netbsd-1-4
changeset: 469606:23eaf6e4f9c4
user: he <he%NetBSD.org@localhost>
date: Tue Oct 19 16:41:14 1999 +0000
description:
Pull up revision 1.10 (requested by mycroft):
Enable VT-switching ioctls on ttyEcfg, which allows Linux X servers
to work when properly configured (with symlink /emul/linux/dev/tty0
-> /dev/ttyEcfg).
diffstat:
sys/dev/wscons/wsdisplay_compat_usl.c | 116 +++++++++++++++++++--------------
1 files changed, 68 insertions(+), 48 deletions(-)
diffs (151 lines):
diff -r 7ff582aba663 -r 23eaf6e4f9c4 sys/dev/wscons/wsdisplay_compat_usl.c
--- a/sys/dev/wscons/wsdisplay_compat_usl.c Tue Oct 19 16:39:20 1999 +0000
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c Tue Oct 19 16:41:14 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_compat_usl.c,v 1.7.2.1 1999/06/21 16:31:30 perry Exp $ */
+/* $NetBSD: wsdisplay_compat_usl.c,v 1.7.2.2 1999/10/19 16:41:14 he Exp $ */
/*
* Copyright (c) 1998
@@ -288,7 +288,71 @@
}
int
-wsdisplay_usl_ioctl(sc, scr, cmd, data, flag, p)
+wsdisplay_usl_ioctl1(sc, cmd, data, flag, p)
+ struct wsdisplay_softc *sc;
+ u_long cmd;
+ caddr_t data;
+ int flag;
+ struct proc *p;
+{
+ int idx, maxidx;
+
+ switch (cmd) {
+ case VT_OPENQRY:
+ maxidx = wsdisplay_maxscreenidx(sc);
+ for (idx = 0; idx <= maxidx; idx++) {
+ if (wsdisplay_screenstate(sc, idx) == 0) {
+ *(int *)data = idx + 1;
+ return (0);
+ }
+ }
+ return (ENXIO);
+ case VT_GETACTIVE:
+ idx = wsdisplay_getactivescreen(sc);
+ *(int *)data = idx + 1;
+ return (0);
+ case VT_ACTIVATE:
+ idx = *(int *)data - 1;
+ return (wsdisplay_switch((struct device *)sc, idx, 1));
+ case VT_WAITACTIVE:
+ idx = *(int *)data - 1;
+ return (wsscreen_switchwait(sc, idx));
+ case VT_GETSTATE:
+#define ss ((struct vt_stat *)data)
+ idx = wsdisplay_getactivescreen(sc);
+ ss->v_active = idx + 1;
+ ss->v_state = 0;
+ maxidx = wsdisplay_maxscreenidx(sc);
+ for (idx = 0; idx <= maxidx; idx++)
+ if (wsdisplay_screenstate(sc, idx) == EBUSY)
+ ss->v_state |= (1 << (idx + 1));
+#undef s
+ return (0);
+
+#ifdef WSDISPLAY_COMPAT_PCVT
+ case VGAPCVTID:
+#define id ((struct pcvtid *)data)
+ strcpy(id->name, "pcvt");
+ id->rmajor = 3;
+ id->rminor = 32;
+#undef id
+ return (0);
+#endif
+#ifdef WSDISPLAY_COMPAT_SYSCONS
+ case CONS_GETVERS:
+ *(int *)data = 0x200; /* version 2.0 */
+ return (0);
+#endif
+
+ default:
+ return (-1);
+ }
+
+ return (0);
+}
+
+int
+wsdisplay_usl_ioctl2(sc, scr, cmd, data, flag, p)
struct wsdisplay_softc *sc;
struct wsscreen *scr;
u_long cmd;
@@ -296,7 +360,7 @@
int flag;
struct proc *p;
{
- int res, idx, maxidx;
+ int res;
struct usl_syncdata *sd;
int req, intarg;
struct wskbd_bell_data bd;
@@ -345,36 +409,7 @@
}
#undef d
return (0);
- case VT_OPENQRY:
- maxidx = wsdisplay_maxscreenidx(sc);
- for (idx = 0; idx <= maxidx; idx++) {
- if (wsdisplay_screenstate(sc, idx) == 0) {
- *(int *)data = idx + 1;
- return (0);
- }
- }
- return (ENXIO);
- case VT_GETACTIVE:
- idx = wsdisplay_getactivescreen(sc);
- *(int *)data = idx + 1;
- return (0);
- case VT_ACTIVATE:
- idx = *(int *)data - 1;
- return (wsdisplay_switch((struct device *)sc, idx, 1));
- case VT_WAITACTIVE:
- idx = *(int *)data - 1;
- return (wsscreen_switchwait(sc, idx));
- case VT_GETSTATE:
-#define ss ((struct vt_stat *)data)
- idx = wsdisplay_getactivescreen(sc);
- ss->v_active = idx + 1;
- ss->v_state = 0;
- maxidx = wsdisplay_maxscreenidx(sc);
- for (idx = 0; idx <= maxidx; idx++)
- if (wsdisplay_screenstate(sc, idx) == EBUSY)
- ss->v_state |= (1 << (idx + 1));
-#undef s
- return (0);
+
case KDENABIO:
if (suser(p->p_ucred, &p->p_acflag) || securelevel > 1)
return (EPERM);
@@ -396,21 +431,6 @@
/* XXX ignore for now */
return (0);
-#ifdef WSDISPLAY_COMPAT_PCVT
- case VGAPCVTID:
-#define id ((struct pcvtid *)data)
- strcpy(id->name, "pcvt");
- id->rmajor = 3;
- id->rminor = 32;
-#undef id
- return (0);
-#endif
-#ifdef WSDISPLAY_COMPAT_SYSCONS
- case CONS_GETVERS:
- *(int *)data = 0x200; /* version 2.0 */
- return (0);
-#endif
-
default:
return (-1);
Home |
Main Index |
Thread Index |
Old Index