UEFIStarter
a simple UEFI framework
files.h
Go to the documentation of this file.
1 
11 #ifndef __FILES_H
12 #define __FILES_H
13 
14 #include <Uefi.h>
15 #include <Guid/FileInfo.h>
16 #include <Protocol/SimpleFileSystem.h>
17 
22 typedef struct {
23  UINTN memory_pages;
24  UINT64 data_length;
25  char data[];
27 
28 EFI_FILE_HANDLE find_root_volume();
29 EFI_FILE_HANDLE find_file(CHAR16 *pathname);
30 file_contents_t *get_file_contents(CHAR16 *filename);
31 
32 
33 #endif
file_contents_t * get_file_contents(CHAR16 *filename)
Reads a file&#39;s contents.
Definition: files.c:77
EFI_FILE_HANDLE find_file(CHAR16 *pathname)
Opens a file handle, if the given file exists.
Definition: files.c:54
UINT64 data_length
the file&#39;s content length
Definition: files.h:24
Data structure for file contents.
Definition: files.h:22
EFI_FILE_HANDLE find_root_volume()
Opens a handle for the first filesystem root.
Definition: files.c:25
UINTN memory_pages
the number of memory pages required to hold the current instance
Definition: files.h:23