| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: wsdisplay.c,v 1.140 2016/07/07 06:55:42 msaitoh Exp $ */ | | 1 | /* $NetBSD: wsdisplay.c,v 1.141 2017/01/25 15:40:31 jakllsch Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. | | 4 | * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * 3. All advertising materials mentioning features or use of this software | | 14 | * 3. All advertising materials mentioning features or use of this software |
| @@ -21,27 +21,27 @@ | | | @@ -21,27 +21,27 @@ |
21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | | 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
31 | */ | | 31 | */ |
32 | | | 32 | |
33 | #include <sys/cdefs.h> | | 33 | #include <sys/cdefs.h> |
34 | __KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.140 2016/07/07 06:55:42 msaitoh Exp $"); | | 34 | __KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.141 2017/01/25 15:40:31 jakllsch Exp $"); |
35 | | | 35 | |
36 | #ifdef _KERNEL_OPT | | 36 | #ifdef _KERNEL_OPT |
37 | #include "opt_wsdisplay_compat.h" | | 37 | #include "opt_wsdisplay_compat.h" |
38 | #include "opt_wsmsgattrs.h" | | 38 | #include "opt_wsmsgattrs.h" |
39 | #endif | | 39 | #endif |
40 | | | 40 | |
41 | #include "wskbd.h" | | 41 | #include "wskbd.h" |
42 | #include "wsmux.h" | | 42 | #include "wsmux.h" |
43 | #include "wsdisplay.h" | | 43 | #include "wsdisplay.h" |
44 | | | 44 | |
45 | #include <sys/param.h> | | 45 | #include <sys/param.h> |
46 | #include <sys/conf.h> | | 46 | #include <sys/conf.h> |
47 | #include <sys/device.h> | | 47 | #include <sys/device.h> |
| @@ -1213,27 +1213,27 @@ int | | | @@ -1213,27 +1213,27 @@ int |
1213 | wsdisplay_param(device_t dv, u_long cmd, struct wsdisplay_param *dp) | | 1213 | wsdisplay_param(device_t dv, u_long cmd, struct wsdisplay_param *dp) |
1214 | { | | 1214 | { |
1215 | struct wsdisplay_softc *sc = device_private(dv); | | 1215 | struct wsdisplay_softc *sc = device_private(dv); |
1216 | return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, | | 1216 | return ((*sc->sc_accessops->ioctl)(sc->sc_accesscookie, |
1217 | sc->sc_focus->scr_dconf->emulcookie, | | 1217 | sc->sc_focus->scr_dconf->emulcookie, |
1218 | cmd, (void *)dp, 0, NULL)); | | 1218 | cmd, (void *)dp, 0, NULL)); |
1219 | } | | 1219 | } |
1220 | | | 1220 | |
1221 | int | | 1221 | int |
1222 | wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, | | 1222 | wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, |
1223 | u_long cmd, void *data, int flag, struct lwp *l) | | 1223 | u_long cmd, void *data, int flag, struct lwp *l) |
1224 | { | | 1224 | { |
1225 | int error; | | 1225 | int error; |
1226 | char namebuf[16]; | | 1226 | char namebuf[32]; |
1227 | struct wsdisplay_font fd; | | 1227 | struct wsdisplay_font fd; |
1228 | #ifdef WSDISPLAY_SCROLLSUPPORT | | 1228 | #ifdef WSDISPLAY_SCROLLSUPPORT |
1229 | struct wsdisplay_scroll_data *ksdp, *usdp; | | 1229 | struct wsdisplay_scroll_data *ksdp, *usdp; |
1230 | #endif | | 1230 | #endif |
1231 | | | 1231 | |
1232 | #if NWSKBD > 0 | | 1232 | #if NWSKBD > 0 |
1233 | struct wsevsrc *inp; | | 1233 | struct wsevsrc *inp; |
1234 | | | 1234 | |
1235 | #ifdef WSDISPLAY_COMPAT_RAWKBD | | 1235 | #ifdef WSDISPLAY_COMPAT_RAWKBD |
1236 | switch (cmd) { | | 1236 | switch (cmd) { |
1237 | case WSKBDIO_SETMODE: | | 1237 | case WSKBDIO_SETMODE: |
1238 | scr->scr_rawkbd = (*(int *)data == WSKBD_RAW); | | 1238 | scr->scr_rawkbd = (*(int *)data == WSKBD_RAW); |
1239 | return (wsdisplay_update_rawkbd(sc, scr)); | | 1239 | return (wsdisplay_update_rawkbd(sc, scr)); |