2 Header file for helper functions useful for accessing files.
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef _EFI_MEMORY_FILE_H
10 #define _EFI_MEMORY_FILE_H
14 #include <Common/UefiBaseTypes.h>
17 // Common data structures
22 CHAR8
*CurrentFilePointer
;
27 // Functions declarations
32 IN CHAR8
*InputFileName
,
33 OUT EFI_HANDLE
*OutputMemoryFile
40 This opens a file, reads it into memory and returns a memory file
45 InputFile Memory file image.
46 OutputMemoryFile Handle to memory file
51 OutputMemoryFile is valid if !EFI_ERROR
58 IN EFI_HANDLE InputMemoryFile
65 Frees all memory associated with the input memory file.
69 InputMemoryFile Handle to memory file
80 IN EFI_HANDLE InputMemoryFile
87 This function reads a line from the memory file. The newline characters
88 are stripped and a null terminated string is returned.
90 If the string pointer returned is non-NULL, then the caller must free the
91 memory associated with this string.
95 InputMemoryFile Handle to memory file
100 NULL character termincated string otherwise (MUST BE FREED BY CALLER)