asloptions.c revision 1.1.1.1.10.2 1 1.1.1.1.10.2 tls /******************************************************************************
2 1.1.1.1.10.2 tls *
3 1.1.1.1.10.2 tls * Module Name: asloptions - compiler command line processing
4 1.1.1.1.10.2 tls *
5 1.1.1.1.10.2 tls *****************************************************************************/
6 1.1.1.1.10.2 tls
7 1.1.1.1.10.2 tls /*
8 1.1.1.1.10.2 tls * Copyright (C) 2000 - 2013, Intel Corp.
9 1.1.1.1.10.2 tls * All rights reserved.
10 1.1.1.1.10.2 tls *
11 1.1.1.1.10.2 tls * Redistribution and use in source and binary forms, with or without
12 1.1.1.1.10.2 tls * modification, are permitted provided that the following conditions
13 1.1.1.1.10.2 tls * are met:
14 1.1.1.1.10.2 tls * 1. Redistributions of source code must retain the above copyright
15 1.1.1.1.10.2 tls * notice, this list of conditions, and the following disclaimer,
16 1.1.1.1.10.2 tls * without modification.
17 1.1.1.1.10.2 tls * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.1.10.2 tls * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.1.10.2 tls * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.1.10.2 tls * including a substantially similar Disclaimer requirement for further
21 1.1.1.1.10.2 tls * binary redistribution.
22 1.1.1.1.10.2 tls * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.1.10.2 tls * of any contributors may be used to endorse or promote products derived
24 1.1.1.1.10.2 tls * from this software without specific prior written permission.
25 1.1.1.1.10.2 tls *
26 1.1.1.1.10.2 tls * Alternatively, this software may be distributed under the terms of the
27 1.1.1.1.10.2 tls * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.1.10.2 tls * Software Foundation.
29 1.1.1.1.10.2 tls *
30 1.1.1.1.10.2 tls * NO WARRANTY
31 1.1.1.1.10.2 tls * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.1.10.2 tls * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.1.10.2 tls * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1.1.1.10.2 tls * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.1.10.2 tls * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.1.10.2 tls * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.1.10.2 tls * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.1.10.2 tls * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.1.10.2 tls * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.1.10.2 tls * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.1.10.2 tls * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.1.10.2 tls */
43 1.1.1.1.10.2 tls
44 1.1.1.1.10.2 tls #include "aslcompiler.h"
45 1.1.1.1.10.2 tls #include "acapps.h"
46 1.1.1.1.10.2 tls #include "acdisasm.h"
47 1.1.1.1.10.2 tls
48 1.1.1.1.10.2 tls #define _COMPONENT ACPI_COMPILER
49 1.1.1.1.10.2 tls ACPI_MODULE_NAME ("asloption")
50 1.1.1.1.10.2 tls
51 1.1.1.1.10.2 tls
52 1.1.1.1.10.2 tls /* Local prototypes */
53 1.1.1.1.10.2 tls
54 1.1.1.1.10.2 tls static int
55 1.1.1.1.10.2 tls AslDoOptions (
56 1.1.1.1.10.2 tls int argc,
57 1.1.1.1.10.2 tls char **argv,
58 1.1.1.1.10.2 tls BOOLEAN IsResponseFile);
59 1.1.1.1.10.2 tls
60 1.1.1.1.10.2 tls static void
61 1.1.1.1.10.2 tls AslMergeOptionTokens (
62 1.1.1.1.10.2 tls char *InBuffer,
63 1.1.1.1.10.2 tls char *OutBuffer);
64 1.1.1.1.10.2 tls
65 1.1.1.1.10.2 tls static int
66 1.1.1.1.10.2 tls AslDoResponseFile (
67 1.1.1.1.10.2 tls char *Filename);
68 1.1.1.1.10.2 tls
69 1.1.1.1.10.2 tls
70 1.1.1.1.10.2 tls #define ASL_TOKEN_SEPARATORS " \t\n"
71 1.1.1.1.10.2 tls #define ASL_SUPPORTED_OPTIONS "@:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z"
72 1.1.1.1.10.2 tls
73 1.1.1.1.10.2 tls
74 1.1.1.1.10.2 tls /*******************************************************************************
75 1.1.1.1.10.2 tls *
76 1.1.1.1.10.2 tls * FUNCTION: AslCommandLine
77 1.1.1.1.10.2 tls *
78 1.1.1.1.10.2 tls * PARAMETERS: argc/argv
79 1.1.1.1.10.2 tls *
80 1.1.1.1.10.2 tls * RETURN: Last argv index
81 1.1.1.1.10.2 tls *
82 1.1.1.1.10.2 tls * DESCRIPTION: Command line processing
83 1.1.1.1.10.2 tls *
84 1.1.1.1.10.2 tls ******************************************************************************/
85 1.1.1.1.10.2 tls
86 1.1.1.1.10.2 tls int
87 1.1.1.1.10.2 tls AslCommandLine (
88 1.1.1.1.10.2 tls int argc,
89 1.1.1.1.10.2 tls char **argv)
90 1.1.1.1.10.2 tls {
91 1.1.1.1.10.2 tls int BadCommandLine = 0;
92 1.1.1.1.10.2 tls ACPI_STATUS Status;
93 1.1.1.1.10.2 tls
94 1.1.1.1.10.2 tls
95 1.1.1.1.10.2 tls /* Minimum command line contains at least the command and an input file */
96 1.1.1.1.10.2 tls
97 1.1.1.1.10.2 tls if (argc < 2)
98 1.1.1.1.10.2 tls {
99 1.1.1.1.10.2 tls printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
100 1.1.1.1.10.2 tls Usage ();
101 1.1.1.1.10.2 tls exit (1);
102 1.1.1.1.10.2 tls }
103 1.1.1.1.10.2 tls
104 1.1.1.1.10.2 tls /* Process all command line options */
105 1.1.1.1.10.2 tls
106 1.1.1.1.10.2 tls BadCommandLine = AslDoOptions (argc, argv, FALSE);
107 1.1.1.1.10.2 tls
108 1.1.1.1.10.2 tls if (Gbl_DoTemplates)
109 1.1.1.1.10.2 tls {
110 1.1.1.1.10.2 tls Status = DtCreateTemplates (Gbl_TemplateSignature);
111 1.1.1.1.10.2 tls if (ACPI_FAILURE (Status))
112 1.1.1.1.10.2 tls {
113 1.1.1.1.10.2 tls exit (-1);
114 1.1.1.1.10.2 tls }
115 1.1.1.1.10.2 tls exit (1);
116 1.1.1.1.10.2 tls }
117 1.1.1.1.10.2 tls
118 1.1.1.1.10.2 tls /* Next parameter must be the input filename */
119 1.1.1.1.10.2 tls
120 1.1.1.1.10.2 tls if (!argv[AcpiGbl_Optind] &&
121 1.1.1.1.10.2 tls !Gbl_DisasmFlag &&
122 1.1.1.1.10.2 tls !Gbl_GetAllTables)
123 1.1.1.1.10.2 tls {
124 1.1.1.1.10.2 tls printf ("Missing input filename\n");
125 1.1.1.1.10.2 tls BadCommandLine = TRUE;
126 1.1.1.1.10.2 tls }
127 1.1.1.1.10.2 tls
128 1.1.1.1.10.2 tls if (Gbl_DoSignon)
129 1.1.1.1.10.2 tls {
130 1.1.1.1.10.2 tls printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
131 1.1.1.1.10.2 tls if (Gbl_IgnoreErrors)
132 1.1.1.1.10.2 tls {
133 1.1.1.1.10.2 tls printf ("Ignoring all errors, forcing AML file generation\n\n");
134 1.1.1.1.10.2 tls }
135 1.1.1.1.10.2 tls }
136 1.1.1.1.10.2 tls
137 1.1.1.1.10.2 tls if (BadCommandLine)
138 1.1.1.1.10.2 tls {
139 1.1.1.1.10.2 tls printf ("Use -h option for help information\n");
140 1.1.1.1.10.2 tls exit (1);
141 1.1.1.1.10.2 tls }
142 1.1.1.1.10.2 tls
143 1.1.1.1.10.2 tls return (AcpiGbl_Optind);
144 1.1.1.1.10.2 tls }
145 1.1.1.1.10.2 tls
146 1.1.1.1.10.2 tls
147 1.1.1.1.10.2 tls /*******************************************************************************
148 1.1.1.1.10.2 tls *
149 1.1.1.1.10.2 tls * FUNCTION: AslDoOptions
150 1.1.1.1.10.2 tls *
151 1.1.1.1.10.2 tls * PARAMETERS: argc/argv - Standard argc/argv
152 1.1.1.1.10.2 tls * IsResponseFile - TRUE if executing a response file.
153 1.1.1.1.10.2 tls *
154 1.1.1.1.10.2 tls * RETURN: Status
155 1.1.1.1.10.2 tls *
156 1.1.1.1.10.2 tls * DESCRIPTION: Command line option processing
157 1.1.1.1.10.2 tls *
158 1.1.1.1.10.2 tls ******************************************************************************/
159 1.1.1.1.10.2 tls
160 1.1.1.1.10.2 tls static int
161 1.1.1.1.10.2 tls AslDoOptions (
162 1.1.1.1.10.2 tls int argc,
163 1.1.1.1.10.2 tls char **argv,
164 1.1.1.1.10.2 tls BOOLEAN IsResponseFile)
165 1.1.1.1.10.2 tls {
166 1.1.1.1.10.2 tls ACPI_STATUS Status;
167 1.1.1.1.10.2 tls UINT32 j;
168 1.1.1.1.10.2 tls
169 1.1.1.1.10.2 tls
170 1.1.1.1.10.2 tls /* Get the command line options */
171 1.1.1.1.10.2 tls
172 1.1.1.1.10.2 tls while ((j = AcpiGetopt (argc, argv, ASL_SUPPORTED_OPTIONS)) != EOF) switch (j)
173 1.1.1.1.10.2 tls {
174 1.1.1.1.10.2 tls case '@': /* Begin a response file */
175 1.1.1.1.10.2 tls
176 1.1.1.1.10.2 tls if (IsResponseFile)
177 1.1.1.1.10.2 tls {
178 1.1.1.1.10.2 tls printf ("Nested command files are not supported\n");
179 1.1.1.1.10.2 tls return (-1);
180 1.1.1.1.10.2 tls }
181 1.1.1.1.10.2 tls
182 1.1.1.1.10.2 tls if (AslDoResponseFile (AcpiGbl_Optarg))
183 1.1.1.1.10.2 tls {
184 1.1.1.1.10.2 tls return (-1);
185 1.1.1.1.10.2 tls }
186 1.1.1.1.10.2 tls break;
187 1.1.1.1.10.2 tls
188 1.1.1.1.10.2 tls case 'b': /* Debug output options */
189 1.1.1.1.10.2 tls
190 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
191 1.1.1.1.10.2 tls {
192 1.1.1.1.10.2 tls case 'f':
193 1.1.1.1.10.2 tls
194 1.1.1.1.10.2 tls AslCompilerdebug = 1; /* same as yydebug */
195 1.1.1.1.10.2 tls DtParserdebug = 1;
196 1.1.1.1.10.2 tls PrParserdebug = 1;
197 1.1.1.1.10.2 tls break;
198 1.1.1.1.10.2 tls
199 1.1.1.1.10.2 tls case 't':
200 1.1.1.1.10.2 tls
201 1.1.1.1.10.2 tls break;
202 1.1.1.1.10.2 tls
203 1.1.1.1.10.2 tls default:
204 1.1.1.1.10.2 tls
205 1.1.1.1.10.2 tls printf ("Unknown option: -b%s\n", AcpiGbl_Optarg);
206 1.1.1.1.10.2 tls return (-1);
207 1.1.1.1.10.2 tls }
208 1.1.1.1.10.2 tls
209 1.1.1.1.10.2 tls /* Produce debug output file */
210 1.1.1.1.10.2 tls
211 1.1.1.1.10.2 tls Gbl_DebugFlag = TRUE;
212 1.1.1.1.10.2 tls break;
213 1.1.1.1.10.2 tls
214 1.1.1.1.10.2 tls case 'c':
215 1.1.1.1.10.2 tls
216 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
217 1.1.1.1.10.2 tls {
218 1.1.1.1.10.2 tls case 'r':
219 1.1.1.1.10.2 tls
220 1.1.1.1.10.2 tls Gbl_NoResourceChecking = TRUE;
221 1.1.1.1.10.2 tls break;
222 1.1.1.1.10.2 tls
223 1.1.1.1.10.2 tls default:
224 1.1.1.1.10.2 tls
225 1.1.1.1.10.2 tls printf ("Unknown option: -c%s\n", AcpiGbl_Optarg);
226 1.1.1.1.10.2 tls return (-1);
227 1.1.1.1.10.2 tls }
228 1.1.1.1.10.2 tls break;
229 1.1.1.1.10.2 tls
230 1.1.1.1.10.2 tls case 'd': /* Disassembler */
231 1.1.1.1.10.2 tls
232 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
233 1.1.1.1.10.2 tls {
234 1.1.1.1.10.2 tls case '^':
235 1.1.1.1.10.2 tls
236 1.1.1.1.10.2 tls Gbl_DoCompile = FALSE;
237 1.1.1.1.10.2 tls break;
238 1.1.1.1.10.2 tls
239 1.1.1.1.10.2 tls case 'a':
240 1.1.1.1.10.2 tls
241 1.1.1.1.10.2 tls Gbl_DoCompile = FALSE;
242 1.1.1.1.10.2 tls Gbl_DisassembleAll = TRUE;
243 1.1.1.1.10.2 tls break;
244 1.1.1.1.10.2 tls
245 1.1.1.1.10.2 tls case 'b': /* Do not convert buffers to resource descriptors */
246 1.1.1.1.10.2 tls
247 1.1.1.1.10.2 tls AcpiGbl_NoResourceDisassembly = TRUE;
248 1.1.1.1.10.2 tls break;
249 1.1.1.1.10.2 tls
250 1.1.1.1.10.2 tls case 'c':
251 1.1.1.1.10.2 tls
252 1.1.1.1.10.2 tls break;
253 1.1.1.1.10.2 tls
254 1.1.1.1.10.2 tls default:
255 1.1.1.1.10.2 tls
256 1.1.1.1.10.2 tls printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
257 1.1.1.1.10.2 tls return (-1);
258 1.1.1.1.10.2 tls }
259 1.1.1.1.10.2 tls
260 1.1.1.1.10.2 tls Gbl_DisasmFlag = TRUE;
261 1.1.1.1.10.2 tls break;
262 1.1.1.1.10.2 tls
263 1.1.1.1.10.2 tls case 'D': /* Define a symbol */
264 1.1.1.1.10.2 tls
265 1.1.1.1.10.2 tls PrAddDefine (AcpiGbl_Optarg, NULL, TRUE);
266 1.1.1.1.10.2 tls break;
267 1.1.1.1.10.2 tls
268 1.1.1.1.10.2 tls case 'e': /* External files for disassembler */
269 1.1.1.1.10.2 tls
270 1.1.1.1.10.2 tls /* Get entire list of external files */
271 1.1.1.1.10.2 tls
272 1.1.1.1.10.2 tls AcpiGbl_Optind--;
273 1.1.1.1.10.2 tls
274 1.1.1.1.10.2 tls while (argv[AcpiGbl_Optind] &&
275 1.1.1.1.10.2 tls (argv[AcpiGbl_Optind][0] != '-'))
276 1.1.1.1.10.2 tls {
277 1.1.1.1.10.2 tls Status = AcpiDmAddToExternalFileList (argv[AcpiGbl_Optind]);
278 1.1.1.1.10.2 tls if (ACPI_FAILURE (Status))
279 1.1.1.1.10.2 tls {
280 1.1.1.1.10.2 tls printf ("Could not add %s to external list\n", argv[AcpiGbl_Optind]);
281 1.1.1.1.10.2 tls return (-1);
282 1.1.1.1.10.2 tls }
283 1.1.1.1.10.2 tls
284 1.1.1.1.10.2 tls AcpiGbl_Optind++;
285 1.1.1.1.10.2 tls }
286 1.1.1.1.10.2 tls break;
287 1.1.1.1.10.2 tls
288 1.1.1.1.10.2 tls case 'f':
289 1.1.1.1.10.2 tls
290 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
291 1.1.1.1.10.2 tls {
292 1.1.1.1.10.2 tls case '^': /* Ignore errors and force creation of aml file */
293 1.1.1.1.10.2 tls
294 1.1.1.1.10.2 tls Gbl_IgnoreErrors = TRUE;
295 1.1.1.1.10.2 tls break;
296 1.1.1.1.10.2 tls
297 1.1.1.1.10.2 tls case 'e': /* Disassembler: Get external declaration file */
298 1.1.1.1.10.2 tls
299 1.1.1.1.10.2 tls if (AcpiGetoptArgument (argc, argv))
300 1.1.1.1.10.2 tls {
301 1.1.1.1.10.2 tls return (-1);
302 1.1.1.1.10.2 tls }
303 1.1.1.1.10.2 tls
304 1.1.1.1.10.2 tls Gbl_ExternalRefFilename = AcpiGbl_Optarg;
305 1.1.1.1.10.2 tls break;
306 1.1.1.1.10.2 tls
307 1.1.1.1.10.2 tls default:
308 1.1.1.1.10.2 tls
309 1.1.1.1.10.2 tls printf ("Unknown option: -f%s\n", AcpiGbl_Optarg);
310 1.1.1.1.10.2 tls return (-1);
311 1.1.1.1.10.2 tls }
312 1.1.1.1.10.2 tls break;
313 1.1.1.1.10.2 tls
314 1.1.1.1.10.2 tls case 'G':
315 1.1.1.1.10.2 tls
316 1.1.1.1.10.2 tls Gbl_CompileGeneric = TRUE;
317 1.1.1.1.10.2 tls break;
318 1.1.1.1.10.2 tls
319 1.1.1.1.10.2 tls case 'g': /* Get all ACPI tables */
320 1.1.1.1.10.2 tls
321 1.1.1.1.10.2 tls Gbl_GetAllTables = TRUE;
322 1.1.1.1.10.2 tls Gbl_DoCompile = FALSE;
323 1.1.1.1.10.2 tls break;
324 1.1.1.1.10.2 tls
325 1.1.1.1.10.2 tls case 'h':
326 1.1.1.1.10.2 tls
327 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
328 1.1.1.1.10.2 tls {
329 1.1.1.1.10.2 tls case '^':
330 1.1.1.1.10.2 tls
331 1.1.1.1.10.2 tls Usage ();
332 1.1.1.1.10.2 tls exit (0);
333 1.1.1.1.10.2 tls
334 1.1.1.1.10.2 tls case 'c':
335 1.1.1.1.10.2 tls
336 1.1.1.1.10.2 tls UtDisplayConstantOpcodes ();
337 1.1.1.1.10.2 tls exit (0);
338 1.1.1.1.10.2 tls
339 1.1.1.1.10.2 tls case 'f':
340 1.1.1.1.10.2 tls
341 1.1.1.1.10.2 tls AslFilenameHelp ();
342 1.1.1.1.10.2 tls exit (0);
343 1.1.1.1.10.2 tls
344 1.1.1.1.10.2 tls case 'r':
345 1.1.1.1.10.2 tls
346 1.1.1.1.10.2 tls /* reserved names */
347 1.1.1.1.10.2 tls
348 1.1.1.1.10.2 tls ApDisplayReservedNames ();
349 1.1.1.1.10.2 tls exit (0);
350 1.1.1.1.10.2 tls
351 1.1.1.1.10.2 tls case 't':
352 1.1.1.1.10.2 tls
353 1.1.1.1.10.2 tls UtDisplaySupportedTables ();
354 1.1.1.1.10.2 tls exit (0);
355 1.1.1.1.10.2 tls
356 1.1.1.1.10.2 tls default:
357 1.1.1.1.10.2 tls
358 1.1.1.1.10.2 tls printf ("Unknown option: -h%s\n", AcpiGbl_Optarg);
359 1.1.1.1.10.2 tls return (-1);
360 1.1.1.1.10.2 tls }
361 1.1.1.1.10.2 tls
362 1.1.1.1.10.2 tls case 'I': /* Add an include file search directory */
363 1.1.1.1.10.2 tls
364 1.1.1.1.10.2 tls FlAddIncludeDirectory (AcpiGbl_Optarg);
365 1.1.1.1.10.2 tls break;
366 1.1.1.1.10.2 tls
367 1.1.1.1.10.2 tls case 'i': /* Output AML as an include file */
368 1.1.1.1.10.2 tls
369 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
370 1.1.1.1.10.2 tls {
371 1.1.1.1.10.2 tls case 'a':
372 1.1.1.1.10.2 tls
373 1.1.1.1.10.2 tls /* Produce assembly code include file */
374 1.1.1.1.10.2 tls
375 1.1.1.1.10.2 tls Gbl_AsmIncludeOutputFlag = TRUE;
376 1.1.1.1.10.2 tls break;
377 1.1.1.1.10.2 tls
378 1.1.1.1.10.2 tls case 'c':
379 1.1.1.1.10.2 tls
380 1.1.1.1.10.2 tls /* Produce C include file */
381 1.1.1.1.10.2 tls
382 1.1.1.1.10.2 tls Gbl_C_IncludeOutputFlag = TRUE;
383 1.1.1.1.10.2 tls break;
384 1.1.1.1.10.2 tls
385 1.1.1.1.10.2 tls case 'n':
386 1.1.1.1.10.2 tls
387 1.1.1.1.10.2 tls /* Compiler/Disassembler: Ignore the NOOP operator */
388 1.1.1.1.10.2 tls
389 1.1.1.1.10.2 tls AcpiGbl_IgnoreNoopOperator = TRUE;
390 1.1.1.1.10.2 tls break;
391 1.1.1.1.10.2 tls
392 1.1.1.1.10.2 tls default:
393 1.1.1.1.10.2 tls
394 1.1.1.1.10.2 tls printf ("Unknown option: -i%s\n", AcpiGbl_Optarg);
395 1.1.1.1.10.2 tls return (-1);
396 1.1.1.1.10.2 tls }
397 1.1.1.1.10.2 tls break;
398 1.1.1.1.10.2 tls
399 1.1.1.1.10.2 tls case 'l': /* Listing files */
400 1.1.1.1.10.2 tls
401 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
402 1.1.1.1.10.2 tls {
403 1.1.1.1.10.2 tls case '^':
404 1.1.1.1.10.2 tls
405 1.1.1.1.10.2 tls /* Produce listing file (Mixed source/aml) */
406 1.1.1.1.10.2 tls
407 1.1.1.1.10.2 tls Gbl_ListingFlag = TRUE;
408 1.1.1.1.10.2 tls break;
409 1.1.1.1.10.2 tls
410 1.1.1.1.10.2 tls case 'i':
411 1.1.1.1.10.2 tls
412 1.1.1.1.10.2 tls /* Produce preprocessor output file */
413 1.1.1.1.10.2 tls
414 1.1.1.1.10.2 tls Gbl_PreprocessorOutputFlag = TRUE;
415 1.1.1.1.10.2 tls break;
416 1.1.1.1.10.2 tls
417 1.1.1.1.10.2 tls case 'n':
418 1.1.1.1.10.2 tls
419 1.1.1.1.10.2 tls /* Produce namespace file */
420 1.1.1.1.10.2 tls
421 1.1.1.1.10.2 tls Gbl_NsOutputFlag = TRUE;
422 1.1.1.1.10.2 tls break;
423 1.1.1.1.10.2 tls
424 1.1.1.1.10.2 tls case 's':
425 1.1.1.1.10.2 tls
426 1.1.1.1.10.2 tls /* Produce combined source file */
427 1.1.1.1.10.2 tls
428 1.1.1.1.10.2 tls Gbl_SourceOutputFlag = TRUE;
429 1.1.1.1.10.2 tls break;
430 1.1.1.1.10.2 tls
431 1.1.1.1.10.2 tls default:
432 1.1.1.1.10.2 tls
433 1.1.1.1.10.2 tls printf ("Unknown option: -l%s\n", AcpiGbl_Optarg);
434 1.1.1.1.10.2 tls return (-1);
435 1.1.1.1.10.2 tls }
436 1.1.1.1.10.2 tls break;
437 1.1.1.1.10.2 tls
438 1.1.1.1.10.2 tls case 'm': /* Set line buffer size */
439 1.1.1.1.10.2 tls
440 1.1.1.1.10.2 tls Gbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
441 1.1.1.1.10.2 tls if (Gbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
442 1.1.1.1.10.2 tls {
443 1.1.1.1.10.2 tls Gbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
444 1.1.1.1.10.2 tls }
445 1.1.1.1.10.2 tls printf ("Line Buffer Size: %u\n", Gbl_LineBufferSize);
446 1.1.1.1.10.2 tls break;
447 1.1.1.1.10.2 tls
448 1.1.1.1.10.2 tls case 'n': /* Parse only */
449 1.1.1.1.10.2 tls
450 1.1.1.1.10.2 tls Gbl_ParseOnlyFlag = TRUE;
451 1.1.1.1.10.2 tls break;
452 1.1.1.1.10.2 tls
453 1.1.1.1.10.2 tls case 'o': /* Control compiler AML optimizations */
454 1.1.1.1.10.2 tls
455 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
456 1.1.1.1.10.2 tls {
457 1.1.1.1.10.2 tls case 'a':
458 1.1.1.1.10.2 tls
459 1.1.1.1.10.2 tls /* Disable all optimizations */
460 1.1.1.1.10.2 tls
461 1.1.1.1.10.2 tls Gbl_FoldConstants = FALSE;
462 1.1.1.1.10.2 tls Gbl_IntegerOptimizationFlag = FALSE;
463 1.1.1.1.10.2 tls Gbl_ReferenceOptimizationFlag = FALSE;
464 1.1.1.1.10.2 tls break;
465 1.1.1.1.10.2 tls
466 1.1.1.1.10.2 tls case 'f':
467 1.1.1.1.10.2 tls
468 1.1.1.1.10.2 tls /* Disable folding on "normal" expressions */
469 1.1.1.1.10.2 tls
470 1.1.1.1.10.2 tls Gbl_FoldConstants = FALSE;
471 1.1.1.1.10.2 tls break;
472 1.1.1.1.10.2 tls
473 1.1.1.1.10.2 tls case 'i':
474 1.1.1.1.10.2 tls
475 1.1.1.1.10.2 tls /* Disable integer optimization to constants */
476 1.1.1.1.10.2 tls
477 1.1.1.1.10.2 tls Gbl_IntegerOptimizationFlag = FALSE;
478 1.1.1.1.10.2 tls break;
479 1.1.1.1.10.2 tls
480 1.1.1.1.10.2 tls case 'n':
481 1.1.1.1.10.2 tls
482 1.1.1.1.10.2 tls /* Disable named reference optimization */
483 1.1.1.1.10.2 tls
484 1.1.1.1.10.2 tls Gbl_ReferenceOptimizationFlag = FALSE;
485 1.1.1.1.10.2 tls break;
486 1.1.1.1.10.2 tls
487 1.1.1.1.10.2 tls case 't':
488 1.1.1.1.10.2 tls
489 1.1.1.1.10.2 tls /* Display compile time(s) */
490 1.1.1.1.10.2 tls
491 1.1.1.1.10.2 tls Gbl_CompileTimesFlag = TRUE;
492 1.1.1.1.10.2 tls break;
493 1.1.1.1.10.2 tls
494 1.1.1.1.10.2 tls default:
495 1.1.1.1.10.2 tls
496 1.1.1.1.10.2 tls printf ("Unknown option: -c%s\n", AcpiGbl_Optarg);
497 1.1.1.1.10.2 tls return (-1);
498 1.1.1.1.10.2 tls }
499 1.1.1.1.10.2 tls break;
500 1.1.1.1.10.2 tls
501 1.1.1.1.10.2 tls case 'P': /* Preprocessor options */
502 1.1.1.1.10.2 tls
503 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
504 1.1.1.1.10.2 tls {
505 1.1.1.1.10.2 tls case '^': /* Proprocess only, emit (.i) file */
506 1.1.1.1.10.2 tls
507 1.1.1.1.10.2 tls Gbl_PreprocessOnly = TRUE;
508 1.1.1.1.10.2 tls Gbl_PreprocessorOutputFlag = TRUE;
509 1.1.1.1.10.2 tls break;
510 1.1.1.1.10.2 tls
511 1.1.1.1.10.2 tls case 'n': /* Disable preprocessor */
512 1.1.1.1.10.2 tls
513 1.1.1.1.10.2 tls Gbl_PreprocessFlag = FALSE;
514 1.1.1.1.10.2 tls break;
515 1.1.1.1.10.2 tls
516 1.1.1.1.10.2 tls default:
517 1.1.1.1.10.2 tls
518 1.1.1.1.10.2 tls printf ("Unknown option: -P%s\n", AcpiGbl_Optarg);
519 1.1.1.1.10.2 tls return (-1);
520 1.1.1.1.10.2 tls }
521 1.1.1.1.10.2 tls break;
522 1.1.1.1.10.2 tls
523 1.1.1.1.10.2 tls case 'p': /* Override default AML output filename */
524 1.1.1.1.10.2 tls
525 1.1.1.1.10.2 tls Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
526 1.1.1.1.10.2 tls UtConvertBackslashes (Gbl_OutputFilenamePrefix);
527 1.1.1.1.10.2 tls
528 1.1.1.1.10.2 tls Gbl_UseDefaultAmlFilename = FALSE;
529 1.1.1.1.10.2 tls break;
530 1.1.1.1.10.2 tls
531 1.1.1.1.10.2 tls case 'r': /* Override revision found in table header */
532 1.1.1.1.10.2 tls
533 1.1.1.1.10.2 tls Gbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
534 1.1.1.1.10.2 tls break;
535 1.1.1.1.10.2 tls
536 1.1.1.1.10.2 tls case 's': /* Create AML in a source code file */
537 1.1.1.1.10.2 tls
538 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
539 1.1.1.1.10.2 tls {
540 1.1.1.1.10.2 tls case 'a':
541 1.1.1.1.10.2 tls
542 1.1.1.1.10.2 tls /* Produce assembly code output file */
543 1.1.1.1.10.2 tls
544 1.1.1.1.10.2 tls Gbl_AsmOutputFlag = TRUE;
545 1.1.1.1.10.2 tls break;
546 1.1.1.1.10.2 tls
547 1.1.1.1.10.2 tls case 'c':
548 1.1.1.1.10.2 tls
549 1.1.1.1.10.2 tls /* Produce C hex output file */
550 1.1.1.1.10.2 tls
551 1.1.1.1.10.2 tls Gbl_C_OutputFlag = TRUE;
552 1.1.1.1.10.2 tls break;
553 1.1.1.1.10.2 tls
554 1.1.1.1.10.2 tls case 'o':
555 1.1.1.1.10.2 tls
556 1.1.1.1.10.2 tls /* Produce AML offset table in C */
557 1.1.1.1.10.2 tls
558 1.1.1.1.10.2 tls Gbl_C_OffsetTableFlag = TRUE;
559 1.1.1.1.10.2 tls break;
560 1.1.1.1.10.2 tls
561 1.1.1.1.10.2 tls default:
562 1.1.1.1.10.2 tls
563 1.1.1.1.10.2 tls printf ("Unknown option: -s%s\n", AcpiGbl_Optarg);
564 1.1.1.1.10.2 tls return (-1);
565 1.1.1.1.10.2 tls }
566 1.1.1.1.10.2 tls break;
567 1.1.1.1.10.2 tls
568 1.1.1.1.10.2 tls case 't': /* Produce hex table output file */
569 1.1.1.1.10.2 tls
570 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
571 1.1.1.1.10.2 tls {
572 1.1.1.1.10.2 tls case 'a':
573 1.1.1.1.10.2 tls
574 1.1.1.1.10.2 tls Gbl_HexOutputFlag = HEX_OUTPUT_ASM;
575 1.1.1.1.10.2 tls break;
576 1.1.1.1.10.2 tls
577 1.1.1.1.10.2 tls case 'c':
578 1.1.1.1.10.2 tls
579 1.1.1.1.10.2 tls Gbl_HexOutputFlag = HEX_OUTPUT_C;
580 1.1.1.1.10.2 tls break;
581 1.1.1.1.10.2 tls
582 1.1.1.1.10.2 tls case 's':
583 1.1.1.1.10.2 tls
584 1.1.1.1.10.2 tls Gbl_HexOutputFlag = HEX_OUTPUT_ASL;
585 1.1.1.1.10.2 tls break;
586 1.1.1.1.10.2 tls
587 1.1.1.1.10.2 tls default:
588 1.1.1.1.10.2 tls
589 1.1.1.1.10.2 tls printf ("Unknown option: -t%s\n", AcpiGbl_Optarg);
590 1.1.1.1.10.2 tls return (-1);
591 1.1.1.1.10.2 tls }
592 1.1.1.1.10.2 tls break;
593 1.1.1.1.10.2 tls
594 1.1.1.1.10.2 tls case 'T': /* Create a ACPI table template file */
595 1.1.1.1.10.2 tls
596 1.1.1.1.10.2 tls Gbl_DoTemplates = TRUE;
597 1.1.1.1.10.2 tls Gbl_TemplateSignature = AcpiGbl_Optarg;
598 1.1.1.1.10.2 tls break;
599 1.1.1.1.10.2 tls
600 1.1.1.1.10.2 tls case 'v': /* Version and verbosity settings */
601 1.1.1.1.10.2 tls
602 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
603 1.1.1.1.10.2 tls {
604 1.1.1.1.10.2 tls case '^':
605 1.1.1.1.10.2 tls
606 1.1.1.1.10.2 tls printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
607 1.1.1.1.10.2 tls exit (0);
608 1.1.1.1.10.2 tls
609 1.1.1.1.10.2 tls case 'a':
610 1.1.1.1.10.2 tls
611 1.1.1.1.10.2 tls /* Disable all error/warning/remark messages */
612 1.1.1.1.10.2 tls
613 1.1.1.1.10.2 tls Gbl_NoErrors = TRUE;
614 1.1.1.1.10.2 tls break;
615 1.1.1.1.10.2 tls
616 1.1.1.1.10.2 tls case 'e':
617 1.1.1.1.10.2 tls
618 1.1.1.1.10.2 tls /* Disable all warning/remark messages (errors only) */
619 1.1.1.1.10.2 tls
620 1.1.1.1.10.2 tls Gbl_DisplayRemarks = FALSE;
621 1.1.1.1.10.2 tls Gbl_DisplayWarnings = FALSE;
622 1.1.1.1.10.2 tls break;
623 1.1.1.1.10.2 tls
624 1.1.1.1.10.2 tls case 'i':
625 1.1.1.1.10.2 tls /*
626 1.1.1.1.10.2 tls * Support for integrated development environment(s).
627 1.1.1.1.10.2 tls *
628 1.1.1.1.10.2 tls * 1) No compiler signon
629 1.1.1.1.10.2 tls * 2) Send stderr messages to stdout
630 1.1.1.1.10.2 tls * 3) Less verbose error messages (single line only for each)
631 1.1.1.1.10.2 tls * 4) Error/warning messages are formatted appropriately to
632 1.1.1.1.10.2 tls * be recognized by MS Visual Studio
633 1.1.1.1.10.2 tls */
634 1.1.1.1.10.2 tls Gbl_VerboseErrors = FALSE;
635 1.1.1.1.10.2 tls Gbl_DoSignon = FALSE;
636 1.1.1.1.10.2 tls Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
637 1.1.1.1.10.2 tls break;
638 1.1.1.1.10.2 tls
639 1.1.1.1.10.2 tls case 'o':
640 1.1.1.1.10.2 tls
641 1.1.1.1.10.2 tls Gbl_DisplayOptimizations = TRUE;
642 1.1.1.1.10.2 tls break;
643 1.1.1.1.10.2 tls
644 1.1.1.1.10.2 tls case 'r':
645 1.1.1.1.10.2 tls
646 1.1.1.1.10.2 tls Gbl_DisplayRemarks = FALSE;
647 1.1.1.1.10.2 tls break;
648 1.1.1.1.10.2 tls
649 1.1.1.1.10.2 tls case 's':
650 1.1.1.1.10.2 tls
651 1.1.1.1.10.2 tls Gbl_DoSignon = FALSE;
652 1.1.1.1.10.2 tls break;
653 1.1.1.1.10.2 tls
654 1.1.1.1.10.2 tls case 't':
655 1.1.1.1.10.2 tls
656 1.1.1.1.10.2 tls Gbl_VerboseTemplates = TRUE;
657 1.1.1.1.10.2 tls break;
658 1.1.1.1.10.2 tls
659 1.1.1.1.10.2 tls case 'w':
660 1.1.1.1.10.2 tls
661 1.1.1.1.10.2 tls /* Get the required argument */
662 1.1.1.1.10.2 tls
663 1.1.1.1.10.2 tls if (AcpiGetoptArgument (argc, argv))
664 1.1.1.1.10.2 tls {
665 1.1.1.1.10.2 tls return (-1);
666 1.1.1.1.10.2 tls }
667 1.1.1.1.10.2 tls
668 1.1.1.1.10.2 tls Status = AslDisableException (AcpiGbl_Optarg);
669 1.1.1.1.10.2 tls if (ACPI_FAILURE (Status))
670 1.1.1.1.10.2 tls {
671 1.1.1.1.10.2 tls return (-1);
672 1.1.1.1.10.2 tls }
673 1.1.1.1.10.2 tls break;
674 1.1.1.1.10.2 tls
675 1.1.1.1.10.2 tls default:
676 1.1.1.1.10.2 tls
677 1.1.1.1.10.2 tls printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);
678 1.1.1.1.10.2 tls return (-1);
679 1.1.1.1.10.2 tls }
680 1.1.1.1.10.2 tls break;
681 1.1.1.1.10.2 tls
682 1.1.1.1.10.2 tls case 'w': /* Set warning levels */
683 1.1.1.1.10.2 tls
684 1.1.1.1.10.2 tls switch (AcpiGbl_Optarg[0])
685 1.1.1.1.10.2 tls {
686 1.1.1.1.10.2 tls case '1':
687 1.1.1.1.10.2 tls
688 1.1.1.1.10.2 tls Gbl_WarningLevel = ASL_WARNING;
689 1.1.1.1.10.2 tls break;
690 1.1.1.1.10.2 tls
691 1.1.1.1.10.2 tls case '2':
692 1.1.1.1.10.2 tls
693 1.1.1.1.10.2 tls Gbl_WarningLevel = ASL_WARNING2;
694 1.1.1.1.10.2 tls break;
695 1.1.1.1.10.2 tls
696 1.1.1.1.10.2 tls case '3':
697 1.1.1.1.10.2 tls
698 1.1.1.1.10.2 tls Gbl_WarningLevel = ASL_WARNING3;
699 1.1.1.1.10.2 tls break;
700 1.1.1.1.10.2 tls
701 1.1.1.1.10.2 tls case 'e':
702 1.1.1.1.10.2 tls
703 1.1.1.1.10.2 tls Gbl_WarningsAsErrors = TRUE;
704 1.1.1.1.10.2 tls break;
705 1.1.1.1.10.2 tls
706 1.1.1.1.10.2 tls default:
707 1.1.1.1.10.2 tls
708 1.1.1.1.10.2 tls printf ("Unknown option: -w%s\n", AcpiGbl_Optarg);
709 1.1.1.1.10.2 tls return (-1);
710 1.1.1.1.10.2 tls }
711 1.1.1.1.10.2 tls break;
712 1.1.1.1.10.2 tls
713 1.1.1.1.10.2 tls case 'x': /* Set debug print output level */
714 1.1.1.1.10.2 tls
715 1.1.1.1.10.2 tls AcpiDbgLevel = strtoul (AcpiGbl_Optarg, NULL, 16);
716 1.1.1.1.10.2 tls break;
717 1.1.1.1.10.2 tls
718 1.1.1.1.10.2 tls case 'z':
719 1.1.1.1.10.2 tls
720 1.1.1.1.10.2 tls Gbl_UseOriginalCompilerId = TRUE;
721 1.1.1.1.10.2 tls break;
722 1.1.1.1.10.2 tls
723 1.1.1.1.10.2 tls default:
724 1.1.1.1.10.2 tls
725 1.1.1.1.10.2 tls return (-1);
726 1.1.1.1.10.2 tls }
727 1.1.1.1.10.2 tls
728 1.1.1.1.10.2 tls return (0);
729 1.1.1.1.10.2 tls }
730 1.1.1.1.10.2 tls
731 1.1.1.1.10.2 tls
732 1.1.1.1.10.2 tls /*******************************************************************************
733 1.1.1.1.10.2 tls *
734 1.1.1.1.10.2 tls * FUNCTION: AslMergeOptionTokens
735 1.1.1.1.10.2 tls *
736 1.1.1.1.10.2 tls * PARAMETERS: InBuffer - Input containing an option string
737 1.1.1.1.10.2 tls * OutBuffer - Merged output buffer
738 1.1.1.1.10.2 tls *
739 1.1.1.1.10.2 tls * RETURN: None
740 1.1.1.1.10.2 tls *
741 1.1.1.1.10.2 tls * DESCRIPTION: Remove all whitespace from an option string.
742 1.1.1.1.10.2 tls *
743 1.1.1.1.10.2 tls ******************************************************************************/
744 1.1.1.1.10.2 tls
745 1.1.1.1.10.2 tls static void
746 1.1.1.1.10.2 tls AslMergeOptionTokens (
747 1.1.1.1.10.2 tls char *InBuffer,
748 1.1.1.1.10.2 tls char *OutBuffer)
749 1.1.1.1.10.2 tls {
750 1.1.1.1.10.2 tls char *Token;
751 1.1.1.1.10.2 tls
752 1.1.1.1.10.2 tls
753 1.1.1.1.10.2 tls *OutBuffer = 0;
754 1.1.1.1.10.2 tls
755 1.1.1.1.10.2 tls Token = strtok (InBuffer, ASL_TOKEN_SEPARATORS);
756 1.1.1.1.10.2 tls while (Token)
757 1.1.1.1.10.2 tls {
758 1.1.1.1.10.2 tls strcat (OutBuffer, Token);
759 1.1.1.1.10.2 tls Token = strtok (NULL, ASL_TOKEN_SEPARATORS);
760 1.1.1.1.10.2 tls }
761 1.1.1.1.10.2 tls }
762 1.1.1.1.10.2 tls
763 1.1.1.1.10.2 tls
764 1.1.1.1.10.2 tls /*******************************************************************************
765 1.1.1.1.10.2 tls *
766 1.1.1.1.10.2 tls * FUNCTION: AslDoResponseFile
767 1.1.1.1.10.2 tls *
768 1.1.1.1.10.2 tls * PARAMETERS: Filename - Name of the response file
769 1.1.1.1.10.2 tls *
770 1.1.1.1.10.2 tls * RETURN: Status
771 1.1.1.1.10.2 tls *
772 1.1.1.1.10.2 tls * DESCRIPTION: Open a response file and process all options within.
773 1.1.1.1.10.2 tls *
774 1.1.1.1.10.2 tls ******************************************************************************/
775 1.1.1.1.10.2 tls
776 1.1.1.1.10.2 tls static int
777 1.1.1.1.10.2 tls AslDoResponseFile (
778 1.1.1.1.10.2 tls char *Filename)
779 1.1.1.1.10.2 tls {
780 1.1.1.1.10.2 tls char *argv = StringBuffer2;
781 1.1.1.1.10.2 tls FILE *ResponseFile;
782 1.1.1.1.10.2 tls int OptStatus = 0;
783 1.1.1.1.10.2 tls int Opterr;
784 1.1.1.1.10.2 tls int Optind;
785 1.1.1.1.10.2 tls
786 1.1.1.1.10.2 tls
787 1.1.1.1.10.2 tls ResponseFile = fopen (Filename, "r");
788 1.1.1.1.10.2 tls if (!ResponseFile)
789 1.1.1.1.10.2 tls {
790 1.1.1.1.10.2 tls printf ("Could not open command file %s, %s\n",
791 1.1.1.1.10.2 tls Filename, strerror (errno));
792 1.1.1.1.10.2 tls return (-1);
793 1.1.1.1.10.2 tls }
794 1.1.1.1.10.2 tls
795 1.1.1.1.10.2 tls /* Must save the current GetOpt globals */
796 1.1.1.1.10.2 tls
797 1.1.1.1.10.2 tls Opterr = AcpiGbl_Opterr;
798 1.1.1.1.10.2 tls Optind = AcpiGbl_Optind;
799 1.1.1.1.10.2 tls
800 1.1.1.1.10.2 tls /*
801 1.1.1.1.10.2 tls * Process all lines in the response file. There must be one complete
802 1.1.1.1.10.2 tls * option per line
803 1.1.1.1.10.2 tls */
804 1.1.1.1.10.2 tls while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile))
805 1.1.1.1.10.2 tls {
806 1.1.1.1.10.2 tls /* Compress all tokens, allowing us to use a single argv entry */
807 1.1.1.1.10.2 tls
808 1.1.1.1.10.2 tls AslMergeOptionTokens (StringBuffer, StringBuffer2);
809 1.1.1.1.10.2 tls
810 1.1.1.1.10.2 tls /* Process the option */
811 1.1.1.1.10.2 tls
812 1.1.1.1.10.2 tls AcpiGbl_Opterr = 0;
813 1.1.1.1.10.2 tls AcpiGbl_Optind = 0;
814 1.1.1.1.10.2 tls
815 1.1.1.1.10.2 tls OptStatus = AslDoOptions (1, &argv, TRUE);
816 1.1.1.1.10.2 tls if (OptStatus)
817 1.1.1.1.10.2 tls {
818 1.1.1.1.10.2 tls printf ("Invalid option in command file %s: %s\n",
819 1.1.1.1.10.2 tls Filename, StringBuffer);
820 1.1.1.1.10.2 tls break;
821 1.1.1.1.10.2 tls }
822 1.1.1.1.10.2 tls }
823 1.1.1.1.10.2 tls
824 1.1.1.1.10.2 tls /* Restore the GetOpt globals */
825 1.1.1.1.10.2 tls
826 1.1.1.1.10.2 tls AcpiGbl_Opterr = Opterr;
827 1.1.1.1.10.2 tls AcpiGbl_Optind = Optind;
828 1.1.1.1.10.2 tls
829 1.1.1.1.10.2 tls fclose (ResponseFile);
830 1.1.1.1.10.2 tls return (OptStatus);
831 1.1.1.1.10.2 tls }
832