apmain.c revision 1.1.1.1.4.2 1 1.1.1.1.4.2 rmind /******************************************************************************
2 1.1.1.1.4.2 rmind *
3 1.1.1.1.4.2 rmind * Module Name: apmain - Main module for the acpidump utility
4 1.1.1.1.4.2 rmind *
5 1.1.1.1.4.2 rmind *****************************************************************************/
6 1.1.1.1.4.2 rmind
7 1.1.1.1.4.2 rmind /*
8 1.1.1.1.4.2 rmind * Copyright (C) 2000 - 2013, Intel Corp.
9 1.1.1.1.4.2 rmind * All rights reserved.
10 1.1.1.1.4.2 rmind *
11 1.1.1.1.4.2 rmind * Redistribution and use in source and binary forms, with or without
12 1.1.1.1.4.2 rmind * modification, are permitted provided that the following conditions
13 1.1.1.1.4.2 rmind * are met:
14 1.1.1.1.4.2 rmind * 1. Redistributions of source code must retain the above copyright
15 1.1.1.1.4.2 rmind * notice, this list of conditions, and the following disclaimer,
16 1.1.1.1.4.2 rmind * without modification.
17 1.1.1.1.4.2 rmind * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.1.4.2 rmind * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.1.4.2 rmind * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.1.4.2 rmind * including a substantially similar Disclaimer requirement for further
21 1.1.1.1.4.2 rmind * binary redistribution.
22 1.1.1.1.4.2 rmind * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.1.4.2 rmind * of any contributors may be used to endorse or promote products derived
24 1.1.1.1.4.2 rmind * from this software without specific prior written permission.
25 1.1.1.1.4.2 rmind *
26 1.1.1.1.4.2 rmind * Alternatively, this software may be distributed under the terms of the
27 1.1.1.1.4.2 rmind * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.1.4.2 rmind * Software Foundation.
29 1.1.1.1.4.2 rmind *
30 1.1.1.1.4.2 rmind * NO WARRANTY
31 1.1.1.1.4.2 rmind * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.1.4.2 rmind * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.1.4.2 rmind * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1.1.1.4.2 rmind * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.1.4.2 rmind * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.1.4.2 rmind * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.1.4.2 rmind * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.1.4.2 rmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.1.4.2 rmind * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.1.4.2 rmind * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.1.4.2 rmind * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.1.4.2 rmind */
43 1.1.1.1.4.2 rmind
44 1.1.1.1.4.2 rmind #define _DECLARE_GLOBALS
45 1.1.1.1.4.2 rmind #include "acpidump.h"
46 1.1.1.1.4.2 rmind #include "acapps.h"
47 1.1.1.1.4.2 rmind
48 1.1.1.1.4.2 rmind
49 1.1.1.1.4.2 rmind /*
50 1.1.1.1.4.2 rmind * acpidump - A portable utility for obtaining system ACPI tables and dumping
51 1.1.1.1.4.2 rmind * them in an ASCII hex format suitable for binary extraction via acpixtract.
52 1.1.1.1.4.2 rmind *
53 1.1.1.1.4.2 rmind * Obtaining the system ACPI tables is an OS-specific operation.
54 1.1.1.1.4.2 rmind *
55 1.1.1.1.4.2 rmind * This utility can be ported to any host operating system by providing a
56 1.1.1.1.4.2 rmind * module containing system-specific versions of these interfaces:
57 1.1.1.1.4.2 rmind *
58 1.1.1.1.4.2 rmind * AcpiOsGetTableByAddress
59 1.1.1.1.4.2 rmind * AcpiOsGetTableByIndex
60 1.1.1.1.4.2 rmind * AcpiOsGetTableByName
61 1.1.1.1.4.2 rmind *
62 1.1.1.1.4.2 rmind * See the ACPICA Reference Guide for the exact definitions of these
63 1.1.1.1.4.2 rmind * interfaces. Also, see these ACPICA source code modules for example
64 1.1.1.1.4.2 rmind * implementations:
65 1.1.1.1.4.2 rmind *
66 1.1.1.1.4.2 rmind * source/os_specific/service_layers/oswintbl.c
67 1.1.1.1.4.2 rmind * source/os_specific/service_layers/oslinuxtbl.c
68 1.1.1.1.4.2 rmind */
69 1.1.1.1.4.2 rmind
70 1.1.1.1.4.2 rmind
71 1.1.1.1.4.2 rmind /* Local prototypes */
72 1.1.1.1.4.2 rmind
73 1.1.1.1.4.2 rmind static void
74 1.1.1.1.4.2 rmind ApDisplayUsage (
75 1.1.1.1.4.2 rmind void);
76 1.1.1.1.4.2 rmind
77 1.1.1.1.4.2 rmind static int
78 1.1.1.1.4.2 rmind ApDoOptions (
79 1.1.1.1.4.2 rmind int argc,
80 1.1.1.1.4.2 rmind char **argv);
81 1.1.1.1.4.2 rmind
82 1.1.1.1.4.2 rmind static void
83 1.1.1.1.4.2 rmind ApInsertAction (
84 1.1.1.1.4.2 rmind char *Argument,
85 1.1.1.1.4.2 rmind UINT32 ToBeDone);
86 1.1.1.1.4.2 rmind
87 1.1.1.1.4.2 rmind
88 1.1.1.1.4.2 rmind /* Table for deferred actions from command line options */
89 1.1.1.1.4.2 rmind
90 1.1.1.1.4.2 rmind AP_DUMP_ACTION ActionTable [AP_MAX_ACTIONS];
91 1.1.1.1.4.2 rmind UINT32 CurrentAction = 0;
92 1.1.1.1.4.2 rmind
93 1.1.1.1.4.2 rmind
94 1.1.1.1.4.2 rmind #define AP_UTILITY_NAME "ACPI Binary Table Dump Utility"
95 1.1.1.1.4.2 rmind #define AP_SUPPORTED_OPTIONS "?a:bcf:hn:o:r:svz"
96 1.1.1.1.4.2 rmind
97 1.1.1.1.4.2 rmind
98 1.1.1.1.4.2 rmind /******************************************************************************
99 1.1.1.1.4.2 rmind *
100 1.1.1.1.4.2 rmind * FUNCTION: ApDisplayUsage
101 1.1.1.1.4.2 rmind *
102 1.1.1.1.4.2 rmind * DESCRIPTION: Usage message for the AcpiDump utility
103 1.1.1.1.4.2 rmind *
104 1.1.1.1.4.2 rmind ******************************************************************************/
105 1.1.1.1.4.2 rmind
106 1.1.1.1.4.2 rmind static void
107 1.1.1.1.4.2 rmind ApDisplayUsage (
108 1.1.1.1.4.2 rmind void)
109 1.1.1.1.4.2 rmind {
110 1.1.1.1.4.2 rmind
111 1.1.1.1.4.2 rmind ACPI_USAGE_HEADER ("acpidump [options]");
112 1.1.1.1.4.2 rmind
113 1.1.1.1.4.2 rmind ACPI_OPTION ("-b", "Dump tables to binary files");
114 1.1.1.1.4.2 rmind ACPI_OPTION ("-c", "Dump customized tables");
115 1.1.1.1.4.2 rmind ACPI_OPTION ("-h -?", "This help message");
116 1.1.1.1.4.2 rmind ACPI_OPTION ("-o <File>", "Redirect output to file");
117 1.1.1.1.4.2 rmind ACPI_OPTION ("-r <Address>", "Dump tables from specified RSDP");
118 1.1.1.1.4.2 rmind ACPI_OPTION ("-s", "Print table summaries only");
119 1.1.1.1.4.2 rmind ACPI_OPTION ("-v", "Display version information");
120 1.1.1.1.4.2 rmind ACPI_OPTION ("-z", "Verbose mode");
121 1.1.1.1.4.2 rmind
122 1.1.1.1.4.2 rmind printf ("\nTable Options:\n");
123 1.1.1.1.4.2 rmind
124 1.1.1.1.4.2 rmind ACPI_OPTION ("-a <Address>", "Get table via a physical address");
125 1.1.1.1.4.2 rmind ACPI_OPTION ("-f <BinaryFile>", "Get table via a binary file");
126 1.1.1.1.4.2 rmind ACPI_OPTION ("-n <Signature>", "Get table via a name/signature");
127 1.1.1.1.4.2 rmind
128 1.1.1.1.4.2 rmind printf (
129 1.1.1.1.4.2 rmind "\n"
130 1.1.1.1.4.2 rmind "Invocation without parameters dumps all available tables\n"
131 1.1.1.1.4.2 rmind "Multiple mixed instances of -a, -f, and -n are supported\n\n");
132 1.1.1.1.4.2 rmind }
133 1.1.1.1.4.2 rmind
134 1.1.1.1.4.2 rmind
135 1.1.1.1.4.2 rmind /******************************************************************************
136 1.1.1.1.4.2 rmind *
137 1.1.1.1.4.2 rmind * FUNCTION: ApInsertAction
138 1.1.1.1.4.2 rmind *
139 1.1.1.1.4.2 rmind * PARAMETERS: Argument - Pointer to the argument for this action
140 1.1.1.1.4.2 rmind * ToBeDone - What to do to process this action
141 1.1.1.1.4.2 rmind *
142 1.1.1.1.4.2 rmind * RETURN: None. Exits program if action table becomes full.
143 1.1.1.1.4.2 rmind *
144 1.1.1.1.4.2 rmind * DESCRIPTION: Add an action item to the action table
145 1.1.1.1.4.2 rmind *
146 1.1.1.1.4.2 rmind ******************************************************************************/
147 1.1.1.1.4.2 rmind
148 1.1.1.1.4.2 rmind static void
149 1.1.1.1.4.2 rmind ApInsertAction (
150 1.1.1.1.4.2 rmind char *Argument,
151 1.1.1.1.4.2 rmind UINT32 ToBeDone)
152 1.1.1.1.4.2 rmind {
153 1.1.1.1.4.2 rmind
154 1.1.1.1.4.2 rmind /* Insert action and check for table overflow */
155 1.1.1.1.4.2 rmind
156 1.1.1.1.4.2 rmind ActionTable [CurrentAction].Argument = Argument;
157 1.1.1.1.4.2 rmind ActionTable [CurrentAction].ToBeDone = ToBeDone;
158 1.1.1.1.4.2 rmind
159 1.1.1.1.4.2 rmind CurrentAction++;
160 1.1.1.1.4.2 rmind if (CurrentAction > AP_MAX_ACTIONS)
161 1.1.1.1.4.2 rmind {
162 1.1.1.1.4.2 rmind fprintf (stderr, "Too many table options (max %u)\n", AP_MAX_ACTIONS);
163 1.1.1.1.4.2 rmind exit (-1);
164 1.1.1.1.4.2 rmind }
165 1.1.1.1.4.2 rmind }
166 1.1.1.1.4.2 rmind
167 1.1.1.1.4.2 rmind
168 1.1.1.1.4.2 rmind /******************************************************************************
169 1.1.1.1.4.2 rmind *
170 1.1.1.1.4.2 rmind * FUNCTION: ApDoOptions
171 1.1.1.1.4.2 rmind *
172 1.1.1.1.4.2 rmind * PARAMETERS: argc/argv - Standard argc/argv
173 1.1.1.1.4.2 rmind *
174 1.1.1.1.4.2 rmind * RETURN: Status
175 1.1.1.1.4.2 rmind *
176 1.1.1.1.4.2 rmind * DESCRIPTION: Command line option processing. The main actions for getting
177 1.1.1.1.4.2 rmind * and dumping tables are deferred via the action table.
178 1.1.1.1.4.2 rmind *
179 1.1.1.1.4.2 rmind *****************************************************************************/
180 1.1.1.1.4.2 rmind
181 1.1.1.1.4.2 rmind static int
182 1.1.1.1.4.2 rmind ApDoOptions (
183 1.1.1.1.4.2 rmind int argc,
184 1.1.1.1.4.2 rmind char **argv)
185 1.1.1.1.4.2 rmind {
186 1.1.1.1.4.2 rmind int j;
187 1.1.1.1.4.2 rmind ACPI_STATUS Status;
188 1.1.1.1.4.2 rmind
189 1.1.1.1.4.2 rmind
190 1.1.1.1.4.2 rmind /* Command line options */
191 1.1.1.1.4.2 rmind
192 1.1.1.1.4.2 rmind while ((j = AcpiGetopt (argc, argv, AP_SUPPORTED_OPTIONS)) != EOF) switch (j)
193 1.1.1.1.4.2 rmind {
194 1.1.1.1.4.2 rmind /*
195 1.1.1.1.4.2 rmind * Global options
196 1.1.1.1.4.2 rmind */
197 1.1.1.1.4.2 rmind case 'b': /* Dump all input tables to binary files */
198 1.1.1.1.4.2 rmind
199 1.1.1.1.4.2 rmind Gbl_BinaryMode = TRUE;
200 1.1.1.1.4.2 rmind continue;
201 1.1.1.1.4.2 rmind
202 1.1.1.1.4.2 rmind case 'c': /* Dump customized tables */
203 1.1.1.1.4.2 rmind
204 1.1.1.1.4.2 rmind Gbl_DumpCustomizedTables = TRUE;
205 1.1.1.1.4.2 rmind continue;
206 1.1.1.1.4.2 rmind
207 1.1.1.1.4.2 rmind case 'h':
208 1.1.1.1.4.2 rmind case '?':
209 1.1.1.1.4.2 rmind
210 1.1.1.1.4.2 rmind ApDisplayUsage ();
211 1.1.1.1.4.2 rmind exit (0);
212 1.1.1.1.4.2 rmind
213 1.1.1.1.4.2 rmind case 'o': /* Redirect output to a single file */
214 1.1.1.1.4.2 rmind
215 1.1.1.1.4.2 rmind if (ApOpenOutputFile (AcpiGbl_Optarg))
216 1.1.1.1.4.2 rmind {
217 1.1.1.1.4.2 rmind exit (-1);
218 1.1.1.1.4.2 rmind }
219 1.1.1.1.4.2 rmind continue;
220 1.1.1.1.4.2 rmind
221 1.1.1.1.4.2 rmind case 'r': /* Dump tables from specified RSDP */
222 1.1.1.1.4.2 rmind
223 1.1.1.1.4.2 rmind Status = AcpiUtStrtoul64 (AcpiGbl_Optarg, 0, &Gbl_RsdpBase);
224 1.1.1.1.4.2 rmind if (ACPI_FAILURE (Status))
225 1.1.1.1.4.2 rmind {
226 1.1.1.1.4.2 rmind fprintf (stderr, "%s: Could not convert to a physical address\n",
227 1.1.1.1.4.2 rmind AcpiGbl_Optarg);
228 1.1.1.1.4.2 rmind exit (-1);
229 1.1.1.1.4.2 rmind }
230 1.1.1.1.4.2 rmind continue;
231 1.1.1.1.4.2 rmind
232 1.1.1.1.4.2 rmind case 's': /* Print table summaries only */
233 1.1.1.1.4.2 rmind
234 1.1.1.1.4.2 rmind Gbl_SummaryMode = TRUE;
235 1.1.1.1.4.2 rmind continue;
236 1.1.1.1.4.2 rmind
237 1.1.1.1.4.2 rmind case 'v': /* Revision/version */
238 1.1.1.1.4.2 rmind
239 1.1.1.1.4.2 rmind printf (ACPI_COMMON_SIGNON (AP_UTILITY_NAME));
240 1.1.1.1.4.2 rmind exit (0);
241 1.1.1.1.4.2 rmind
242 1.1.1.1.4.2 rmind case 'z': /* Verbose mode */
243 1.1.1.1.4.2 rmind
244 1.1.1.1.4.2 rmind Gbl_VerboseMode = TRUE;
245 1.1.1.1.4.2 rmind fprintf (stderr, ACPI_COMMON_SIGNON (AP_UTILITY_NAME));
246 1.1.1.1.4.2 rmind continue;
247 1.1.1.1.4.2 rmind
248 1.1.1.1.4.2 rmind /*
249 1.1.1.1.4.2 rmind * Table options
250 1.1.1.1.4.2 rmind */
251 1.1.1.1.4.2 rmind case 'a': /* Get table by physical address */
252 1.1.1.1.4.2 rmind
253 1.1.1.1.4.2 rmind ApInsertAction (AcpiGbl_Optarg, AP_DUMP_TABLE_BY_ADDRESS);
254 1.1.1.1.4.2 rmind break;
255 1.1.1.1.4.2 rmind
256 1.1.1.1.4.2 rmind case 'f': /* Get table from a file */
257 1.1.1.1.4.2 rmind
258 1.1.1.1.4.2 rmind ApInsertAction (AcpiGbl_Optarg, AP_DUMP_TABLE_BY_FILE);
259 1.1.1.1.4.2 rmind break;
260 1.1.1.1.4.2 rmind
261 1.1.1.1.4.2 rmind case 'n': /* Get table by input name (signature) */
262 1.1.1.1.4.2 rmind
263 1.1.1.1.4.2 rmind ApInsertAction (AcpiGbl_Optarg, AP_DUMP_TABLE_BY_NAME);
264 1.1.1.1.4.2 rmind break;
265 1.1.1.1.4.2 rmind
266 1.1.1.1.4.2 rmind default:
267 1.1.1.1.4.2 rmind
268 1.1.1.1.4.2 rmind ApDisplayUsage ();
269 1.1.1.1.4.2 rmind exit (-1);
270 1.1.1.1.4.2 rmind }
271 1.1.1.1.4.2 rmind
272 1.1.1.1.4.2 rmind /* If there are no actions, this means "get/dump all tables" */
273 1.1.1.1.4.2 rmind
274 1.1.1.1.4.2 rmind if (CurrentAction == 0)
275 1.1.1.1.4.2 rmind {
276 1.1.1.1.4.2 rmind ApInsertAction (NULL, AP_DUMP_ALL_TABLES);
277 1.1.1.1.4.2 rmind }
278 1.1.1.1.4.2 rmind
279 1.1.1.1.4.2 rmind return (0);
280 1.1.1.1.4.2 rmind }
281 1.1.1.1.4.2 rmind
282 1.1.1.1.4.2 rmind
283 1.1.1.1.4.2 rmind /******************************************************************************
284 1.1.1.1.4.2 rmind *
285 1.1.1.1.4.2 rmind * FUNCTION: main
286 1.1.1.1.4.2 rmind *
287 1.1.1.1.4.2 rmind * PARAMETERS: argc/argv - Standard argc/argv
288 1.1.1.1.4.2 rmind *
289 1.1.1.1.4.2 rmind * RETURN: Status
290 1.1.1.1.4.2 rmind *
291 1.1.1.1.4.2 rmind * DESCRIPTION: C main function for acpidump utility
292 1.1.1.1.4.2 rmind *
293 1.1.1.1.4.2 rmind ******************************************************************************/
294 1.1.1.1.4.2 rmind
295 1.1.1.1.4.2 rmind int ACPI_SYSTEM_XFACE
296 1.1.1.1.4.2 rmind main (
297 1.1.1.1.4.2 rmind int argc,
298 1.1.1.1.4.2 rmind char *argv[])
299 1.1.1.1.4.2 rmind {
300 1.1.1.1.4.2 rmind int Status = 0;
301 1.1.1.1.4.2 rmind AP_DUMP_ACTION *Action;
302 1.1.1.1.4.2 rmind UINT32 FileSize;
303 1.1.1.1.4.2 rmind UINT32 i;
304 1.1.1.1.4.2 rmind
305 1.1.1.1.4.2 rmind
306 1.1.1.1.4.2 rmind ACPI_DEBUG_INITIALIZE (); /* For debug version only */
307 1.1.1.1.4.2 rmind
308 1.1.1.1.4.2 rmind /* Process command line options */
309 1.1.1.1.4.2 rmind
310 1.1.1.1.4.2 rmind if (ApDoOptions (argc, argv))
311 1.1.1.1.4.2 rmind {
312 1.1.1.1.4.2 rmind return (-1);
313 1.1.1.1.4.2 rmind }
314 1.1.1.1.4.2 rmind
315 1.1.1.1.4.2 rmind /* Get/dump ACPI table(s) as requested */
316 1.1.1.1.4.2 rmind
317 1.1.1.1.4.2 rmind for (i = 0; i < CurrentAction; i++)
318 1.1.1.1.4.2 rmind {
319 1.1.1.1.4.2 rmind Action = &ActionTable[i];
320 1.1.1.1.4.2 rmind switch (Action->ToBeDone)
321 1.1.1.1.4.2 rmind {
322 1.1.1.1.4.2 rmind case AP_DUMP_ALL_TABLES:
323 1.1.1.1.4.2 rmind
324 1.1.1.1.4.2 rmind Status = ApDumpAllTables ();
325 1.1.1.1.4.2 rmind break;
326 1.1.1.1.4.2 rmind
327 1.1.1.1.4.2 rmind case AP_DUMP_TABLE_BY_ADDRESS:
328 1.1.1.1.4.2 rmind
329 1.1.1.1.4.2 rmind Status = ApDumpTableByAddress (Action->Argument);
330 1.1.1.1.4.2 rmind break;
331 1.1.1.1.4.2 rmind
332 1.1.1.1.4.2 rmind case AP_DUMP_TABLE_BY_NAME:
333 1.1.1.1.4.2 rmind
334 1.1.1.1.4.2 rmind Status = ApDumpTableByName (Action->Argument);
335 1.1.1.1.4.2 rmind break;
336 1.1.1.1.4.2 rmind
337 1.1.1.1.4.2 rmind case AP_DUMP_TABLE_BY_FILE:
338 1.1.1.1.4.2 rmind
339 1.1.1.1.4.2 rmind Status = ApDumpTableFromFile (Action->Argument);
340 1.1.1.1.4.2 rmind break;
341 1.1.1.1.4.2 rmind
342 1.1.1.1.4.2 rmind default:
343 1.1.1.1.4.2 rmind
344 1.1.1.1.4.2 rmind fprintf (stderr, "Internal error, invalid action: 0x%X\n",
345 1.1.1.1.4.2 rmind Action->ToBeDone);
346 1.1.1.1.4.2 rmind return (-1);
347 1.1.1.1.4.2 rmind }
348 1.1.1.1.4.2 rmind
349 1.1.1.1.4.2 rmind if (Status)
350 1.1.1.1.4.2 rmind {
351 1.1.1.1.4.2 rmind return (Status);
352 1.1.1.1.4.2 rmind }
353 1.1.1.1.4.2 rmind }
354 1.1.1.1.4.2 rmind
355 1.1.1.1.4.2 rmind if (Gbl_OutputFile)
356 1.1.1.1.4.2 rmind {
357 1.1.1.1.4.2 rmind if (Gbl_VerboseMode)
358 1.1.1.1.4.2 rmind {
359 1.1.1.1.4.2 rmind /* Summary for the output file */
360 1.1.1.1.4.2 rmind
361 1.1.1.1.4.2 rmind FileSize = ApGetFileSize (Gbl_OutputFile);
362 1.1.1.1.4.2 rmind fprintf (stderr, "Output file %s contains 0x%X (%u) bytes\n\n",
363 1.1.1.1.4.2 rmind Gbl_OutputFilename, FileSize, FileSize);
364 1.1.1.1.4.2 rmind }
365 1.1.1.1.4.2 rmind
366 1.1.1.1.4.2 rmind fclose (Gbl_OutputFile);
367 1.1.1.1.4.2 rmind }
368 1.1.1.1.4.2 rmind
369 1.1.1.1.4.2 rmind return (Status);
370 1.1.1.1.4.2 rmind }
371