summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/scmouse.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-05-29 08:43:44 +0000
committerdelphij <delphij@FreeBSD.org>2005-05-29 08:43:44 +0000
commitd85e2a245dcc8641613836c5e18ff42c27142b88 (patch)
treeaab9212340bf7a27e76d41fc69335774ce01644e /sys/dev/syscons/scmouse.c
parent0f324ed5e81e771192910f591b74e28af9e1141a (diff)
downloadFreeBSD-src-d85e2a245dcc8641613836c5e18ff42c27142b88.zip
FreeBSD-src-d85e2a245dcc8641613836c5e18ff42c27142b88.tar.gz
Add VESA mode support for syscons, which enables the support of 15, 16,
24, and 32 bit modes. To use that, syscons(4) must be built with the compile time option 'options SC_PIXEL_MODE', and VESA support (a.k.a. vesa.ko) must be either loaded, or be compiled into the kernel. Do not return EINVAL when the mouse state is changed to what it already is, which seems to cause problems when you have two mice attached, and applications are not likely obtain useful information through the EINVAL caused by showing the mouse pointer twice. Teach vidcontrol(8) about mode names like MODE_<NUMBER>, where <NUMBER> is the video mode number from the vidcontrol -i mode output. Also, revert the video mode if something fails. Obtained from: DragonFlyBSD Discussed at: current@ with patch attached [1] PR: kern/71142 [2] Submitted by: Xuefeng DENG <dsnofe at msn com> [1], Cyrille Lefevre <cyrille dot lefevre at laposte dot net> [2]
Diffstat (limited to 'sys/dev/syscons/scmouse.c')
-rw-r--r--sys/dev/syscons/scmouse.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index a2b7a21..bec8f74 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -679,26 +679,20 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
cur_scp->status &= ~MOUSE_HIDDEN;
if (!ISGRAPHSC(cur_scp))
mark_all(cur_scp);
- splx(s);
- return 0;
- } else {
- splx(s);
- return EINVAL;
}
- break;
+ splx(s);
+ return 0;
+ /* NOTREACHED */
case MOUSE_HIDE:
s = spltty();
if (scp->sc->flags & SC_MOUSE_ENABLED) {
scp->sc->flags &= ~SC_MOUSE_ENABLED;
sc_remove_all_mouse(scp->sc);
- splx(s);
- return 0;
- } else {
- splx(s);
- return EINVAL;
}
- break;
+ splx(s);
+ return 0;
+ /* NOTREACHED */
case MOUSE_MOVEABS:
s = spltty();
OpenPOWER on IntegriCloud