2 Header file for helper functions useful for accessing files.
4 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _EFI_MEMORY_FILE_H
16 #define _EFI_MEMORY_FILE_H
20 #include <Common/UefiBaseTypes.h>
23 // Common data structures
28 CHAR8
*CurrentFilePointer
;
33 // Functions declarations
38 IN CHAR8
*InputFileName
,
39 OUT EFI_HANDLE
*OutputMemoryFile
46 This opens a file, reads it into memory and returns a memory file
51 InputFile Memory file image.
52 OutputMemoryFile Handle to memory file
57 OutputMemoryFile is valid if !EFI_ERROR
64 IN EFI_HANDLE InputMemoryFile
71 Frees all memory associated with the input memory file.
75 InputMemoryFile Handle to memory file
86 IN EFI_HANDLE InputMemoryFile
93 This function reads a line from the memory file. The newline characters
94 are stripped and a null terminated string is returned.
96 If the string pointer returned is non-NULL, then the caller must free the
97 memory associated with this string.
101 InputMemoryFile Handle to memory file
106 NULL character termincated string otherwise (MUST BE FREED BY CALLER)