Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/io/consconfig.c
+++ new/usr/src/uts/common/io/consconfig.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /*
27 27 * Console and mouse configuration
28 28 */
29 29
30 30 #include <sys/types.h>
31 31 #include <sys/param.h>
32 32 #include <sys/cmn_err.h>
33 33 #include <sys/user.h>
34 34 #include <sys/vfs.h>
35 35 #include <sys/vnode.h>
36 36 #include <sys/systm.h>
37 37 #include <sys/file.h>
38 38 #include <sys/klwp.h>
39 39 #include <sys/stropts.h>
40 40 #include <sys/stream.h>
41 41 #include <sys/strsubr.h>
42 42
43 43 #include <sys/consdev.h>
44 44 #include <sys/kbio.h>
45 45 #include <sys/debug.h>
46 46 #include <sys/reboot.h>
47 47 #include <sys/termios.h>
48 48
49 49 #include <sys/ddi.h>
50 50 #include <sys/sunddi.h>
51 51 #include <sys/modctl.h>
52 52 #include <sys/ddi_impldefs.h>
53 53
54 54 #include <sys/strsubr.h>
55 55 #include <sys/errno.h>
56 56 #include <sys/devops.h>
57 57 #include <sys/note.h>
58 58 #include <sys/consplat.h>
59 59
60 60 /*
61 61 * On supported configurations, the firmware defines the keyboard and mouse
62 62 * paths. However, during USB development, it is useful to be able to use
63 63 * the USB keyboard and mouse on machines without full USB firmware support.
64 64 * These variables may be set in /etc/system according to a machine's
65 65 * USB configuration. This module will override the firmware's values
66 66 * with these.
67 67 */
68 68 static char *usb_kb_path = NULL;
69 69 static char *usb_ms_path = NULL;
70 70
71 71 /*
72 72 * This is the loadable module wrapper.
73 73 */
↓ open down ↓ |
73 lines elided |
↑ open up ↑ |
74 74 extern struct mod_ops mod_miscops;
75 75
76 76 /*
77 77 * Module linkage information for the kernel.
78 78 */
79 79 static struct modlmisc modlmisc = {
80 80 &mod_miscops, "console configuration"
81 81 };
82 82
83 83 static struct modlinkage modlinkage = {
84 - MODREV_1, (void *)&modlmisc, NULL
84 + MODREV_1, { (void *)&modlmisc, NULL }
85 85 };
86 86
87 87 int
88 88 _init(void)
89 89 {
90 90 return (mod_install(&modlinkage));
91 91 }
92 92
93 93 int
94 94 _fini(void)
95 95 {
96 96 return (mod_remove(&modlinkage));
97 97 }
98 98
99 99 int
100 100 _info(struct modinfo *modinfop)
101 101 {
102 102 return (mod_info(&modlinkage, modinfop));
103 103 }
104 104
105 105 extern void dynamic_console_config(void);
106 106 extern boolean_t consconfig_dacf_initialized(void);
107 107
108 108 /*
109 109 * Configure keyboard and mouse. Main entry here.
110 110 */
111 111 void
112 112 consconfig(void)
113 113 {
114 114 dynamic_console_config();
115 115 }
116 116
117 117 extern char *
118 118 consconfig_get_usb_kb_path(void) {
119 119 if (usb_kb_path)
120 120 return (i_ddi_strdup(usb_kb_path, KM_SLEEP));
121 121 return (NULL);
122 122 }
123 123
124 124 extern char *
125 125 consconfig_get_usb_ms_path(void) {
126 126 if (usb_ms_path)
127 127 return (i_ddi_strdup(usb_ms_path, KM_SLEEP));
128 128 return (NULL);
129 129 }
130 130
131 131 extern char *
132 132 consconfig_get_plat_fbpath(void) {
133 133 return (plat_fbpath());
134 134 }
135 135
136 136 extern boolean_t
137 137 consconfig_console_is_ready(void) {
138 138 return (consconfig_dacf_initialized());
139 139 }
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX