Lines Matching defs:File
3 * Module Name: apfiles - File-related functions for acpidump utility
22 * copy of the source code appearing in this file ("Covered Code") an
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
170 * DESCRIPTION: Query for file overwrite if it already exists.
210 * RETURN: Open file handle
212 * DESCRIPTION: Open a text output file for acpidump. Checks if file already
221 ACPI_FILE File;
224 /* If file exists, prompt for overwrite */
231 /* Point stdout to the file */
233 File = fopen (Pathname, "w");
234 if (!File)
236 fprintf (stderr, "Could not open output file: %s\n", Pathname);
240 /* Save the file and path */
242 Gbl_OutputFile = File;
257 * DESCRIPTION: Write an ACPI table to a binary file. Builds the output
269 ACPI_FILE File;
308 "Writing [%4.4s] to binary file: %s 0x%X (%u) bytes\n",
312 /* Open the file and dump the entire table in binary mode */
314 File = fopen (Filename, "wb");
315 if (!File)
317 fprintf (stderr, "Could not open output file: %s\n", Filename);
321 Actual = fwrite (Table, 1, TableLength, File);
324 fprintf (stderr, "Error writing binary output file: %s\n", Filename);
325 fclose (File);
329 fclose (File);
338 * PARAMETERS: Pathname - File containing the binary ACPI table
339 * OutFileSize - Where the file size is returned
343 * DESCRIPTION: Open a file and read it entirely into a new buffer
353 ACPI_FILE File;
360 File = fopen (Pathname, "rb");
361 if (!File)
363 fprintf (stderr, "Could not open input file: %s\n", Pathname);
367 /* Need file size to allocate a buffer */
369 FileSize = CmGetFileSize (File);
373 "Could not get input file size: %s\n", Pathname);
377 /* Allocate a buffer for the entire file */
383 "Could not allocate file buffer of size: %u\n", FileSize);
387 /* Read the entire file */
389 Actual = fread (Buffer, 1, FileSize, File);
392 fprintf (stderr, "Could not read input file: %s\n", Pathname);
401 fclose (File);