Deleted Added
full compact
kbd.c (42421) kbd.c (42564)
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $Id: $
26 * $Id: kbd.c,v 1.1 1999/01/09 02:44:50 yokota Exp $
27 */
28
29#include "kbd.h"
30#include "opt_kbd.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>

--- 11 unchanged lines hidden (view full) ---

46
47/* local arrays */
48
49/*
50 * We need at least one entry each in order to initialize a keyboard
51 * for the kernel console. The arrays will be increased dynamically
52 * when necessary.
53 */
27 */
28
29#include "kbd.h"
30#include "opt_kbd.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>

--- 11 unchanged lines hidden (view full) ---

46
47/* local arrays */
48
49/*
50 * We need at least one entry each in order to initialize a keyboard
51 * for the kernel console. The arrays will be increased dynamically
52 * when necessary.
53 */
54static keyboard_t *kbd_ini;
55static keyboard_switch_t *kbdsw_ini;
56static struct cdevsw *kbdcdevsw_ini;
57
54
58static keyboard_t **keyboard = &kbd_ini;
59static int keyboards = 1;
55static int keyboards = 1;
56static keyboard_t *kbd_ini;
57static keyboard_t **keyboard = &kbd_ini;
58static keyboard_switch_t *kbdsw_ini;
60 keyboard_switch_t **kbdsw = &kbdsw_ini;
59 keyboard_switch_t **kbdsw = &kbdsw_ini;
61static struct cdevsw **kbdcdevsw = &kbdcdevsw_ini;
62
60
61#ifdef KBD_INSTALL_CDEV
62
63#define ARRAY_DELTA 4
64
63#define ARRAY_DELTA 4
64
65static struct cdevsw *kbdcdevsw_ini;
66static struct cdevsw **kbdcdevsw = &kbdcdevsw_ini;
67
65static void
66kbd_realloc_array(void)
67{
68 keyboard_t **new_kbd;
69 keyboard_switch_t **new_kbdsw;
70 struct cdevsw **new_cdevsw;
71 int newsize;
72 int s;

--- 19 unchanged lines hidden (view full) ---

92 kbdcdevsw = new_cdevsw;
93 keyboards = newsize;
94 splx(s);
95
96 if (bootverbose)
97 printf("kbd: new array size %d\n", keyboards);
98}
99
68static void
69kbd_realloc_array(void)
70{
71 keyboard_t **new_kbd;
72 keyboard_switch_t **new_kbdsw;
73 struct cdevsw **new_cdevsw;
74 int newsize;
75 int s;

--- 19 unchanged lines hidden (view full) ---

95 kbdcdevsw = new_cdevsw;
96 keyboards = newsize;
97 splx(s);
98
99 if (bootverbose)
100 printf("kbd: new array size %d\n", keyboards);
101}
102
103#endif /* KBD_INSTALL_CDEV */
104
100/*
101 * Low-level keyboard driver functions
102 * Keyboard subdrivers, such as the AT keyboard driver and the USB keyboard
103 * driver, call these functions to initialize the keyboard_t structure
104 * and register it to the virtual keyboard driver `kbd'.
105 */
106
107/* initialize the keyboard_t structure */

--- 1086 unchanged lines hidden ---
105/*
106 * Low-level keyboard driver functions
107 * Keyboard subdrivers, such as the AT keyboard driver and the USB keyboard
108 * driver, call these functions to initialize the keyboard_t structure
109 * and register it to the virtual keyboard driver `kbd'.
110 */
111
112/* initialize the keyboard_t structure */

--- 1086 unchanged lines hidden ---