| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: amldb.c,v 1.3 2011/08/29 20:38:54 joerg Exp $ */ | | 1 | /* $NetBSD: amldb.c,v 1.4 2018/10/14 12:43:58 jmcneill Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1999 Mitsuru IWASAKI <iwasaki@FreeBSD.org> | | 4 | * Copyright (c) 1999 Mitsuru IWASAKI <iwasaki@FreeBSD.org> |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -19,27 +19,27 @@ | | | @@ -19,27 +19,27 @@ |
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | | 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | * SUCH DAMAGE. | | 26 | * SUCH DAMAGE. |
27 | * | | 27 | * |
28 | * Id: amldb.c,v 1.8 2000/08/08 14:12:24 iwasaki Exp | | 28 | * Id: amldb.c,v 1.8 2000/08/08 14:12:24 iwasaki Exp |
29 | * $FreeBSD: src/usr.sbin/acpi/amldb/amldb.c,v 1.3 2001/10/22 17:25:32 iwasaki Exp $ | | 29 | * $FreeBSD: src/usr.sbin/acpi/amldb/amldb.c,v 1.3 2001/10/22 17:25:32 iwasaki Exp $ |
30 | */ | | 30 | */ |
31 | #include <sys/cdefs.h> | | 31 | #include <sys/cdefs.h> |
32 | __RCSID("$NetBSD: amldb.c,v 1.3 2011/08/29 20:38:54 joerg Exp $"); | | 32 | __RCSID("$NetBSD: amldb.c,v 1.4 2018/10/14 12:43:58 jmcneill Exp $"); |
33 | | | 33 | |
34 | #include <sys/param.h> | | 34 | #include <sys/param.h> |
35 | #include <sys/mman.h> | | 35 | #include <sys/mman.h> |
36 | #include <sys/stat.h> | | 36 | #include <sys/stat.h> |
37 | | | 37 | |
38 | #include <acpi_common.h> | | 38 | #include <acpi_common.h> |
39 | #include <aml/aml_amlmem.h> | | 39 | #include <aml/aml_amlmem.h> |
40 | #include <aml/aml_common.h> | | 40 | #include <aml/aml_common.h> |
41 | #include <aml/aml_env.h> | | 41 | #include <aml/aml_env.h> |
42 | #include <aml/aml_parse.h> | | 42 | #include <aml/aml_parse.h> |
43 | #include <aml/aml_region.h> | | 43 | #include <aml/aml_region.h> |
44 | | | 44 | |
45 | #include <assert.h> | | 45 | #include <assert.h> |
| @@ -146,28 +146,28 @@ load_dsdt(const char *dsdtfile) | | | @@ -146,28 +146,28 @@ load_dsdt(const char *dsdtfile) |
146 | } | | 146 | } |
147 | | | 147 | |
148 | __dead static void | | 148 | __dead static void |
149 | usage(const char *progname) | | 149 | usage(const char *progname) |
150 | { | | 150 | { |
151 | | | 151 | |
152 | printf("usage: %s [-d] [-s] [-t] [-h] dsdt_files...\n", progname); | | 152 | printf("usage: %s [-d] [-s] [-t] [-h] dsdt_files...\n", progname); |
153 | exit(1); | | 153 | exit(1); |
154 | } | | 154 | } |
155 | | | 155 | |
156 | int | | 156 | int |
157 | main(int argc, char *argv[]) | | 157 | main(int argc, char *argv[]) |
158 | { | | 158 | { |
159 | char c, *progname; | | 159 | char *progname; |
160 | int i; | | 160 | int c, i; |
161 | | | 161 | |
162 | progname = argv[0]; | | 162 | progname = argv[0]; |
163 | while ((c = getopt(argc, argv, "dsth")) != -1) { | | 163 | while ((c = getopt(argc, argv, "dsth")) != -1) { |
164 | switch (c) { | | 164 | switch (c) { |
165 | case 'd': | | 165 | case 'd': |
166 | regdump_enabled = 1; | | 166 | regdump_enabled = 1; |
167 | break; | | 167 | break; |
168 | case 's': | | 168 | case 's': |
169 | memstat_enabled = 1; | | 169 | memstat_enabled = 1; |
170 | break; | | 170 | break; |
171 | case 't': | | 171 | case 't': |
172 | showtree_enabled = 1; | | 172 | showtree_enabled = 1; |
173 | break; | | 173 | break; |