3 Copyright (c) 2004 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Header file for helper functions useful for accessing files.
22 #ifndef _EFI_MEMORY_FILE_H
23 #define _EFI_MEMORY_FILE_H
27 #include <Common/UefiBaseTypes.h>
34 // Common data structures
39 CHAR8
*CurrentFilePointer
;
44 // Functions declarations
49 IN CHAR8
*InputFileName
,
50 OUT EFI_HANDLE
*OutputMemoryFile
57 This opens a file, reads it into memory and returns a memory file
62 InputFile Memory file image.
63 OutputMemoryFile Handle to memory file
68 OutputMemoryFile is valid if !EFI_ERROR
75 IN EFI_HANDLE InputMemoryFile
82 Frees all memory associated with the input memory file.
86 InputMemoryFile Handle to memory file
97 IN EFI_HANDLE InputMemoryFile
104 This function reads a line from the memory file. The newline characters
105 are stripped and a null terminated string is returned.
107 If the string pointer returned is non-NULL, then the caller must free the
108 memory associated with this string.
112 InputMemoryFile Handle to memory file
117 NULL character termincated string otherwise (MUST BE FREED BY CALLER)