3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4 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>
30 // Common data structures
35 CHAR8
*CurrentFilePointer
;
40 // Functions declarations
45 IN CHAR8
*InputFileName
,
46 OUT EFI_HANDLE
*OutputMemoryFile
53 This opens a file, reads it into memory and returns a memory file
58 InputFile Memory file image.
59 OutputMemoryFile Handle to memory file
64 OutputMemoryFile is valid if !EFI_ERROR
71 IN EFI_HANDLE InputMemoryFile
78 Frees all memory associated with the input memory file.
82 InputMemoryFile Handle to memory file
93 IN EFI_HANDLE InputMemoryFile
100 This function reads a line from the memory file. The newline characters
101 are stripped and a null terminated string is returned.
103 If the string pointer returned is non-NULL, then the caller must free the
104 memory associated with this string.
108 InputMemoryFile Handle to memory file
113 NULL character termincated string otherwise (MUST BE FREED BY CALLER)