iPXE
SimpleFileSystem.h
Go to the documentation of this file.
1 /** @file
2  SimpleFileSystem protocol as defined in the UEFI 2.0 specification.
3 
4  The SimpleFileSystem protocol is the programmatic access to the FAT (12,16,32)
5  file system specified in UEFI 2.0. It can also be used to abstract a file
6  system other than FAT.
7 
8  UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
9 
10 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
11 SPDX-License-Identifier: BSD-2-Clause-Patent
12 
13 **/
14 
15 #ifndef __SIMPLE_FILE_SYSTEM_H__
16 #define __SIMPLE_FILE_SYSTEM_H__
17 
18 FILE_LICENCE ( BSD2_PATENT );
19 
20 #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
21  { \
22  0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
23  }
24 
26 
29 
30 ///
31 /// Protocol GUID name defined in EFI1.1.
32 ///
33 #define SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID
34 
35 ///
36 /// Protocol name defined in EFI1.1.
37 ///
40 
41 /**
42  Open the root directory on a volume.
43 
44  @param This A pointer to the volume to open the root directory.
45  @param Root A pointer to the location to return the opened file handle for the
46  root directory.
47 
48  @retval EFI_SUCCESS The device was opened.
49  @retval EFI_UNSUPPORTED This volume does not support the requested file system type.
50  @retval EFI_NO_MEDIA The device has no medium.
51  @retval EFI_DEVICE_ERROR The device reported an error.
52  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
53  @retval EFI_ACCESS_DENIED The service denied access to the file.
54  @retval EFI_OUT_OF_RESOURCES The volume was not opened due to lack of resources.
55  @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no
56  longer supported. Any existing file handles for this volume are
57  no longer valid. To access the files on the new medium, the
58  volume must be reopened with OpenVolume().
59 
60 **/
61 typedef
65  OUT EFI_FILE_PROTOCOL **Root
66  );
67 
68 #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000
69 
70 ///
71 /// Revision defined in EFI1.1
72 ///
73 #define EFI_FILE_IO_INTERFACE_REVISION EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION
74 
76  ///
77  /// The version of the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. The version
78  /// specified by this specification is 0x00010000. All future revisions
79  /// must be backwards compatible.
80  ///
83 };
84 
85 /**
86  Opens a new file relative to the source file's location.
87 
88  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
89  handle to the source location. This would typically be an open
90  handle to a directory.
91  @param NewHandle A pointer to the location to return the opened handle for the new
92  file.
93  @param FileName The Null-terminated string of the name of the file to be opened.
94  The file name may contain the following path modifiers: "\", ".",
95  and "..".
96  @param OpenMode The mode to open the file. The only valid combinations that the
97  file may be opened with are: Read, Read/Write, or Create/Read/Write.
98  @param Attributes Only valid for EFI_FILE_MODE_CREATE, in which case these are the
99  attribute bits for the newly created file.
100 
101  @retval EFI_SUCCESS The file was opened.
102  @retval EFI_NOT_FOUND The specified file could not be found on the device.
103  @retval EFI_NO_MEDIA The device has no medium.
104  @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no
105  longer supported.
106  @retval EFI_DEVICE_ERROR The device reported an error.
107  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
108  @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write
109  when the media is write-protected.
110  @retval EFI_ACCESS_DENIED The service denied access to the file.
111  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file.
112  @retval EFI_VOLUME_FULL The volume is full.
113 
114 **/
115 typedef
118  IN EFI_FILE_PROTOCOL *This,
119  OUT EFI_FILE_PROTOCOL **NewHandle,
120  IN CHAR16 *FileName,
121  IN UINT64 OpenMode,
122  IN UINT64 Attributes
123  );
124 
125 //
126 // Open modes
127 //
128 #define EFI_FILE_MODE_READ 0x0000000000000001ULL
129 #define EFI_FILE_MODE_WRITE 0x0000000000000002ULL
130 #define EFI_FILE_MODE_CREATE 0x8000000000000000ULL
131 
132 //
133 // File attributes
134 //
135 #define EFI_FILE_READ_ONLY 0x0000000000000001ULL
136 #define EFI_FILE_HIDDEN 0x0000000000000002ULL
137 #define EFI_FILE_SYSTEM 0x0000000000000004ULL
138 #define EFI_FILE_RESERVED 0x0000000000000008ULL
139 #define EFI_FILE_DIRECTORY 0x0000000000000010ULL
140 #define EFI_FILE_ARCHIVE 0x0000000000000020ULL
141 #define EFI_FILE_VALID_ATTR 0x0000000000000037ULL
142 
143 /**
144  Closes a specified file handle.
145 
146  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
147  handle to close.
148 
149  @retval EFI_SUCCESS The file was closed.
150 
151 **/
152 typedef
155  IN EFI_FILE_PROTOCOL *This
156  );
157 
158 /**
159  Close and delete the file handle.
160 
161  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the
162  handle to the file to delete.
163 
164  @retval EFI_SUCCESS The file was closed and deleted, and the handle was closed.
165  @retval EFI_WARN_DELETE_FAILURE The handle was closed, but the file was not deleted.
166 
167 **/
168 typedef
171  IN EFI_FILE_PROTOCOL *This
172  );
173 
174 /**
175  Reads data from a file.
176 
177  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
178  handle to read data from.
179  @param BufferSize On input, the size of the Buffer. On output, the amount of data
180  returned in Buffer. In both cases, the size is measured in bytes.
181  @param Buffer The buffer into which the data is read.
182 
183  @retval EFI_SUCCESS Data was read.
184  @retval EFI_NO_MEDIA The device has no medium.
185  @retval EFI_DEVICE_ERROR The device reported an error.
186  @retval EFI_DEVICE_ERROR An attempt was made to read from a deleted file.
187  @retval EFI_DEVICE_ERROR On entry, the current file position is beyond the end of the file.
188  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
189  @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory
190  entry. BufferSize has been updated with the size
191  needed to complete the request.
192 
193 **/
194 typedef
197  IN EFI_FILE_PROTOCOL *This,
199  OUT VOID *Buffer
200  );
201 
202 /**
203  Writes data to a file.
204 
205  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
206  handle to write data to.
207  @param BufferSize On input, the size of the Buffer. On output, the amount of data
208  actually written. In both cases, the size is measured in bytes.
209  @param Buffer The buffer of data to write.
210 
211  @retval EFI_SUCCESS Data was written.
212  @retval EFI_UNSUPPORTED Writes to open directory files are not supported.
213  @retval EFI_NO_MEDIA The device has no medium.
214  @retval EFI_DEVICE_ERROR The device reported an error.
215  @retval EFI_DEVICE_ERROR An attempt was made to write to a deleted file.
216  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
217  @retval EFI_WRITE_PROTECTED The file or medium is write-protected.
218  @retval EFI_ACCESS_DENIED The file was opened read only.
219  @retval EFI_VOLUME_FULL The volume is full.
220 
221 **/
222 typedef
225  IN EFI_FILE_PROTOCOL *This,
227  IN VOID *Buffer
228  );
229 
230 /**
231  Sets a file's current position.
232 
233  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the
234  file handle to set the requested position on.
235  @param Position The byte position from the start of the file to set.
236 
237  @retval EFI_SUCCESS The position was set.
238  @retval EFI_UNSUPPORTED The seek request for nonzero is not valid on open
239  directories.
240  @retval EFI_DEVICE_ERROR An attempt was made to set the position of a deleted file.
241 
242 **/
243 typedef
246  IN EFI_FILE_PROTOCOL *This,
247  IN UINT64 Position
248  );
249 
250 /**
251  Returns a file's current position.
252 
253  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
254  handle to get the current position on.
255  @param Position The address to return the file's current position value.
256 
257  @retval EFI_SUCCESS The position was returned.
258  @retval EFI_UNSUPPORTED The request is not valid on open directories.
259  @retval EFI_DEVICE_ERROR An attempt was made to get the position from a deleted file.
260 
261 **/
262 typedef
265  IN EFI_FILE_PROTOCOL *This,
266  OUT UINT64 *Position
267  );
268 
269 /**
270  Returns information about a file.
271 
272  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
273  handle the requested information is for.
274  @param InformationType The type identifier for the information being requested.
275  @param BufferSize On input, the size of Buffer. On output, the amount of data
276  returned in Buffer. In both cases, the size is measured in bytes.
277  @param Buffer A pointer to the data buffer to return. The buffer's type is
278  indicated by InformationType.
279 
280  @retval EFI_SUCCESS The information was returned.
281  @retval EFI_UNSUPPORTED The InformationType is not known.
282  @retval EFI_NO_MEDIA The device has no medium.
283  @retval EFI_DEVICE_ERROR The device reported an error.
284  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
285  @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory entry.
286  BufferSize has been updated with the size needed to complete
287  the request.
288 **/
289 typedef
292  IN EFI_FILE_PROTOCOL *This,
293  IN EFI_GUID *InformationType,
295  OUT VOID *Buffer
296  );
297 
298 /**
299  Sets information about a file.
300 
301  @param File A pointer to the EFI_FILE_PROTOCOL instance that is the file
302  handle the information is for.
303  @param InformationType The type identifier for the information being set.
304  @param BufferSize The size, in bytes, of Buffer.
305  @param Buffer A pointer to the data buffer to write. The buffer's type is
306  indicated by InformationType.
307 
308  @retval EFI_SUCCESS The information was set.
309  @retval EFI_UNSUPPORTED The InformationType is not known.
310  @retval EFI_NO_MEDIA The device has no medium.
311  @retval EFI_DEVICE_ERROR The device reported an error.
312  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
313  @retval EFI_WRITE_PROTECTED InformationType is EFI_FILE_INFO_ID and the media is
314  read-only.
315  @retval EFI_WRITE_PROTECTED InformationType is EFI_FILE_PROTOCOL_SYSTEM_INFO_ID
316  and the media is read only.
317  @retval EFI_WRITE_PROTECTED InformationType is EFI_FILE_SYSTEM_VOLUME_LABEL_ID
318  and the media is read-only.
319  @retval EFI_ACCESS_DENIED An attempt is made to change the name of a file to a
320  file that is already present.
321  @retval EFI_ACCESS_DENIED An attempt is being made to change the EFI_FILE_DIRECTORY
322  Attribute.
323  @retval EFI_ACCESS_DENIED An attempt is being made to change the size of a directory.
324  @retval EFI_ACCESS_DENIED InformationType is EFI_FILE_INFO_ID and the file was opened
325  read-only and an attempt is being made to modify a field
326  other than Attribute.
327  @retval EFI_VOLUME_FULL The volume is full.
328  @retval EFI_BAD_BUFFER_SIZE BufferSize is smaller than the size of the type indicated
329  by InformationType.
330 
331 **/
332 typedef
335  IN EFI_FILE_PROTOCOL *This,
336  IN EFI_GUID *InformationType,
338  IN VOID *Buffer
339  );
340 
341 /**
342  Flushes all modified data associated with a file to a device.
343 
344  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
345  handle to flush.
346 
347  @retval EFI_SUCCESS The data was flushed.
348  @retval EFI_NO_MEDIA The device has no medium.
349  @retval EFI_DEVICE_ERROR The device reported an error.
350  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
351  @retval EFI_WRITE_PROTECTED The file or medium is write-protected.
352  @retval EFI_ACCESS_DENIED The file was opened read-only.
353  @retval EFI_VOLUME_FULL The volume is full.
354 
355 **/
356 typedef
359  IN EFI_FILE_PROTOCOL *This
360  );
361 
362 typedef struct {
363  //
364  // If Event is NULL, then blocking I/O is performed.
365  // If Event is not NULL and non-blocking I/O is supported, then non-blocking I/O is performed,
366  // and Event will be signaled when the read request is completed.
367  // The caller must be prepared to handle the case where the callback associated with Event
368  // occurs before the original asynchronous I/O request call returns.
369  //
371 
372  //
373  // Defines whether or not the signaled event encountered an error.
374  //
376 
377  //
378  // For OpenEx(): Not Used, ignored.
379  // For ReadEx(): On input, the size of the Buffer. On output, the amount of data returned in Buffer.
380  // In both cases, the size is measured in bytes.
381  // For WriteEx(): On input, the size of the Buffer. On output, the amount of data actually written.
382  // In both cases, the size is measured in bytes.
383  // For FlushEx(): Not used, ignored.
384  //
386 
387  //
388  // For OpenEx(): Not Used, ignored.
389  // For ReadEx(): The buffer into which the data is read.
390  // For WriteEx(): The buffer of data to write.
391  // For FlushEx(): Not Used, ignored.
392  //
395 
396 /**
397  Opens a new file relative to the source directory's location.
398 
399  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
400  handle to the source location.
401  @param NewHandle A pointer to the location to return the opened handle for the new
402  file.
403  @param FileName The Null-terminated string of the name of the file to be opened.
404  The file name may contain the following path modifiers: "\", ".",
405  and "..".
406  @param OpenMode The mode to open the file. The only valid combinations that the
407  file may be opened with are: Read, Read/Write, or Create/Read/Write.
408  @param Attributes Only valid for EFI_FILE_MODE_CREATE, in which case these are the
409  attribute bits for the newly created file.
410  @param Token A pointer to the token associated with the transaction.
411 
412  @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully.
413  If Event is not NULL (asynchronous I/O): The request was successfully
414  queued for processing.
415  @retval EFI_NOT_FOUND The specified file could not be found on the device.
416  @retval EFI_NO_MEDIA The device has no medium.
417  @retval EFI_MEDIA_CHANGED The device has a different medium in it or the medium is no
418  longer supported.
419  @retval EFI_DEVICE_ERROR The device reported an error.
420  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
421  @retval EFI_WRITE_PROTECTED An attempt was made to create a file, or open a file for write
422  when the media is write-protected.
423  @retval EFI_ACCESS_DENIED The service denied access to the file.
424  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file.
425  @retval EFI_VOLUME_FULL The volume is full.
426 
427 **/
428 typedef
431  IN EFI_FILE_PROTOCOL *This,
432  OUT EFI_FILE_PROTOCOL **NewHandle,
433  IN CHAR16 *FileName,
434  IN UINT64 OpenMode,
435  IN UINT64 Attributes,
436  IN OUT EFI_FILE_IO_TOKEN *Token
437  );
438 
439 /**
440  Reads data from a file.
441 
442  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to read data from.
443  @param Token A pointer to the token associated with the transaction.
444 
445  @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully.
446  If Event is not NULL (asynchronous I/O): The request was successfully
447  queued for processing.
448  @retval EFI_NO_MEDIA The device has no medium.
449  @retval EFI_DEVICE_ERROR The device reported an error.
450  @retval EFI_DEVICE_ERROR An attempt was made to read from a deleted file.
451  @retval EFI_DEVICE_ERROR On entry, the current file position is beyond the end of the file.
452  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
453  @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources.
454 **/
455 typedef
458  IN EFI_FILE_PROTOCOL *This,
459  IN OUT EFI_FILE_IO_TOKEN *Token
460  );
461 
462 /**
463  Writes data to a file.
464 
465  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to write data to.
466  @param Token A pointer to the token associated with the transaction.
467 
468  @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully.
469  If Event is not NULL (asynchronous I/O): The request was successfully
470  queued for processing.
471  @retval EFI_UNSUPPORTED Writes to open directory files are not supported.
472  @retval EFI_NO_MEDIA The device has no medium.
473  @retval EFI_DEVICE_ERROR The device reported an error.
474  @retval EFI_DEVICE_ERROR An attempt was made to write to a deleted file.
475  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
476  @retval EFI_WRITE_PROTECTED The file or medium is write-protected.
477  @retval EFI_ACCESS_DENIED The file was opened read only.
478  @retval EFI_VOLUME_FULL The volume is full.
479  @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources.
480 **/
481 typedef
484  IN EFI_FILE_PROTOCOL *This,
485  IN OUT EFI_FILE_IO_TOKEN *Token
486  );
487 
488 /**
489  Flushes all modified data associated with a file to a device.
490 
491  @param This A pointer to the EFI_FILE_PROTOCOL instance that is the file
492  handle to flush.
493  @param Token A pointer to the token associated with the transaction.
494 
495  @retval EFI_SUCCESS If Event is NULL (blocking I/O): The data was read successfully.
496  If Event is not NULL (asynchronous I/O): The request was successfully
497  queued for processing.
498  @retval EFI_NO_MEDIA The device has no medium.
499  @retval EFI_DEVICE_ERROR The device reported an error.
500  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
501  @retval EFI_WRITE_PROTECTED The file or medium is write-protected.
502  @retval EFI_ACCESS_DENIED The file was opened read-only.
503  @retval EFI_VOLUME_FULL The volume is full.
504  @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources.
505 
506 **/
507 typedef
510  IN EFI_FILE_PROTOCOL *This,
511  IN OUT EFI_FILE_IO_TOKEN *Token
512  );
513 
514 #define EFI_FILE_PROTOCOL_REVISION 0x00010000
515 #define EFI_FILE_PROTOCOL_REVISION2 0x00020000
516 #define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
517 
518 //
519 // Revision defined in EFI1.1.
520 //
521 #define EFI_FILE_REVISION EFI_FILE_PROTOCOL_REVISION
522 
523 ///
524 /// The EFI_FILE_PROTOCOL provides file IO access to supported file systems.
525 /// An EFI_FILE_PROTOCOL provides access to a file's or directory's contents,
526 /// and is also a reference to a location in the directory tree of the file system
527 /// in which the file resides. With any given file handle, other files may be opened
528 /// relative to this file's location, yielding new file handles.
529 ///
531  ///
532  /// The version of the EFI_FILE_PROTOCOL interface. The version specified
533  /// by this specification is EFI_FILE_PROTOCOL_LATEST_REVISION.
534  /// Future versions are required to be backward compatible to version 1.0.
535  ///
551 };
552 
554 
555 #endif
UINT64 Revision
The version of the EFI_FILE_PROTOCOL interface.
EFI_FILE_CLOSE Close
EFI_FILE_GET_POSITION GetPosition
UINT64 Revision
The version of the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.
EFI_STATUS(EFIAPI * EFI_FILE_WRITE)(IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer)
Writes data to a file.
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
VOID * EFI_EVENT
Handle to an event structure.
Definition: UefiBaseType.h:39
EFI_STATUS(EFIAPI * EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME)(IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **Root)
Open the root directory on a volume.
EFI_FILE_READ_EX ReadEx
EFI_FILE_GET_INFO GetInfo
EFI_FILE_FLUSH Flush
EFI_STATUS(EFIAPI * EFI_FILE_OPEN)(IN EFI_FILE_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 Attributes)
Opens a new file relative to the source file's location.
UINT16_t BufferSize
Buffer size.
Definition: pxe_api.h:64
unsigned short CHAR16
EFI_FILE_OPEN_EX OpenEx
EFI_FILE_PROTOCOL EFI_FILE
EFI_STATUS(EFIAPI * EFI_FILE_DELETE)(IN EFI_FILE_PROTOCOL *This)
Close and delete the file handle.
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume
EFI_STATUS(EFIAPI * EFI_FILE_SET_INFO)(IN EFI_FILE_PROTOCOL *This, IN EFI_GUID *InformationType, IN UINTN BufferSize, IN VOID *Buffer)
Sets information about a file.
EFI_STATUS(EFIAPI * EFI_FILE_WRITE_EX)(IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token)
Writes data to a file.
#define OUT
Definition: mlx_utils.h:29
UINT8_t FileName[128]
File name.
Definition: pxe_api.h:60
EFI_FILE_DELETE Delete
EFI_STATUS(EFIAPI * EFI_FILE_GET_POSITION)(IN EFI_FILE_PROTOCOL *This, OUT UINT64 *Position)
Returns a file's current position.
EFI_STATUS(EFIAPI * EFI_FILE_SET_POSITION)(IN EFI_FILE_PROTOCOL *This, IN UINT64 Position)
Sets a file's current position.
EFI_FILE_SET_INFO SetInfo
EFI_STATUS(EFIAPI * EFI_FILE_FLUSH)(IN EFI_FILE_PROTOCOL *This)
Flushes all modified data associated with a file to a device.
EFI_FILE_SET_POSITION SetPosition
#define EFIAPI
SEGOFF16_t Buffer
Buffer address.
Definition: pxe_api.h:65
UINT64 UINTN
Unsigned value of native width.
EFI_FILE_WRITE_EX WriteEx
EFI_FILE_FLUSH_EX FlushEx
#define VOID
Undeclared type.
Definition: Base.h:271
unsigned long long UINT64
Definition: ProcessorBind.h:96
#define IN
Definition: mlx_utils.h:28
EFI_STATUS(EFIAPI * EFI_FILE_READ_EX)(IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token)
Reads data from a file.
EFI_STATUS(EFIAPI * EFI_FILE_CLOSE)(IN EFI_FILE_PROTOCOL *This)
Closes a specified file handle.
EFI_STATUS(EFIAPI * EFI_FILE_GET_INFO)(IN EFI_FILE_PROTOCOL *This, IN EFI_GUID *InformationType, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
Returns information about a file.
EFI_STATUS(EFIAPI * EFI_FILE_FLUSH_EX)(IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token)
Flushes all modified data associated with a file to a device.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE
Protocol name defined in EFI1.1.
EFI_STATUS(EFIAPI * EFI_FILE_READ)(IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer)
Reads data from a file.
EFI_GUID gEfiSimpleFileSystemProtocolGuid
EFI_STATUS(EFIAPI * EFI_FILE_OPEN_EX)(IN EFI_FILE_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 Attributes, IN OUT EFI_FILE_IO_TOKEN *Token)
Opens a new file relative to the source directory's location.
FILE_LICENCE(BSD2_PATENT)
EFI_FILE_WRITE Write
The EFI_FILE_PROTOCOL provides file IO access to supported file systems.
struct _EFI_FILE_PROTOCOL * EFI_FILE_HANDLE