| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: adb_kbd.c,v 1.29 2019/06/09 14:18:29 christos Exp $ */ | | 1 | /* $NetBSD: adb_kbd.c,v 1.30 2020/08/31 17:54:18 macallan Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (C) 1998 Colin Wood | | 4 | * Copyright (C) 1998 Colin Wood |
5 | * Copyright (C) 2006, 2007 Michael Lorenz | | 5 | * Copyright (C) 2006, 2007 Michael Lorenz |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 9 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 10 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 12 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | * notice, this list of conditions and the following disclaimer in the | | 14 | * notice, this list of conditions and the following disclaimer in the |
| @@ -22,27 +22,27 @@ | | | @@ -22,27 +22,27 @@ |
22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | | 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
25 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 25 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 27 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | | 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | */ | | 32 | */ |
33 | | | 33 | |
34 | #include <sys/cdefs.h> | | 34 | #include <sys/cdefs.h> |
35 | __KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.29 2019/06/09 14:18:29 christos Exp $"); | | 35 | __KERNEL_RCSID(0, "$NetBSD: adb_kbd.c,v 1.30 2020/08/31 17:54:18 macallan Exp $"); |
36 | | | 36 | |
37 | #ifdef _KERNEL_OPT | | 37 | #ifdef _KERNEL_OPT |
38 | #include "opt_ddb.h" | | 38 | #include "opt_ddb.h" |
39 | #endif | | 39 | #endif |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/device.h> | | 42 | #include <sys/device.h> |
43 | #include <sys/fcntl.h> | | 43 | #include <sys/fcntl.h> |
44 | #include <sys/poll.h> | | 44 | #include <sys/poll.h> |
45 | #include <sys/select.h> | | 45 | #include <sys/select.h> |
46 | #include <sys/proc.h> | | 46 | #include <sys/proc.h> |
47 | #include <sys/systm.h> | | 47 | #include <sys/systm.h> |
48 | #include <sys/kernel.h> | | 48 | #include <sys/kernel.h> |
| @@ -129,30 +129,30 @@ struct wskbd_accessops adbkbd_accessops | | | @@ -129,30 +129,30 @@ struct wskbd_accessops adbkbd_accessops |
129 | adbkbd_ioctl, | | 129 | adbkbd_ioctl, |
130 | }; | | 130 | }; |
131 | | | 131 | |
132 | static void adbkbd_cngetc(void *, u_int *, int *); | | 132 | static void adbkbd_cngetc(void *, u_int *, int *); |
133 | static void adbkbd_cnpollc(void *, int); | | 133 | static void adbkbd_cnpollc(void *, int); |
134 | | | 134 | |
135 | struct wskbd_consops adbkbd_consops = { | | 135 | struct wskbd_consops adbkbd_consops = { |
136 | adbkbd_cngetc, | | 136 | adbkbd_cngetc, |
137 | adbkbd_cnpollc, | | 137 | adbkbd_cnpollc, |
138 | }; | | 138 | }; |
139 | | | 139 | |
140 | struct wskbd_mapdata adbkbd_keymapdata = { | | 140 | struct wskbd_mapdata adbkbd_keymapdata = { |
141 | akbd_keydesctab, | | 141 | akbd_keydesctab, |
142 | #ifdef AKBD_LAYOUT | | 142 | #ifdef ADBKBD_LAYOUT |
143 | AKBD_LAYOUT, | | 143 | ADBKBD_LAYOUT, |
144 | #else | | 144 | #else |
145 | KB_US, | | 145 | KB_US | KB_APPLE, |
146 | #endif | | 146 | #endif |
147 | }; | | 147 | }; |
148 | | | 148 | |
149 | #if NWSMOUSE > 0 | | 149 | #if NWSMOUSE > 0 |
150 | static int adbkms_enable(void *); | | 150 | static int adbkms_enable(void *); |
151 | static int adbkms_ioctl(void *, u_long, void *, int, struct lwp *); | | 151 | static int adbkms_ioctl(void *, u_long, void *, int, struct lwp *); |
152 | static void adbkms_disable(void *); | | 152 | static void adbkms_disable(void *); |
153 | | | 153 | |
154 | const struct wsmouse_accessops adbkms_accessops = { | | 154 | const struct wsmouse_accessops adbkms_accessops = { |
155 | adbkms_enable, | | 155 | adbkms_enable, |
156 | adbkms_ioctl, | | 156 | adbkms_ioctl, |
157 | adbkms_disable, | | 157 | adbkms_disable, |
158 | }; | | 158 | }; |