Efi_File.read() - Intel Extensible Firmware Interface Specification

Intel extensible firmware interface specification
Table of Contents

Advertisement

10.2.4 EFI_FILE.Read()

Summary
Reads data from a file.
Prototype
EFI_STATUS
(EFIAPI *EFI_FILE_READ) (
IN EFI_FILE
IN OUT UINTN
OUT VOID
);
Parameters
This
BufferSize
Buffer
Description
The
function reads data from a file.
Read()
If
is not a directory, the function reads the requested number of bytes from the file at the
This
file's current position and returns them in Buffer. If the read goes beyond the end of the file, the
read length is truncated to the end of the file. The file's current position is increased by the number
of bytes returned.
If
is a directory, the function reads the directory entry at the file's current position and
This
returns the entry in Buffer. If the
entry, then
EFI_BUFFER_TOO_SMALL
is set to be the size of the buffer needed to read the entry. On success, the current
BufferSize
position is updated to the next directory entry. If there are no more directory entries, the read
returns a zero length buffer.
See Section 10.2.11 for a discussion of EFI_FILE_INFO.
Status Codes Returned
EFI_SUCCESS
EFI_NO_MEDIA
EFI_DEVICE_ERROR
EFI_VOLUME_CORRUPTED
EFI_BUFFER_TOO_SMALL
Version 1.02
*This,
*BufferSize,
*Buffer
A pointer to the
EFI_FILE
from. Type
is defined in Section 10.2.
EFI_FILE
On input, the size of the Buffer. On output, the amount of data
returned in Buffer. In both cases, the size is measured in bytes.
The buffer into which the data is read.
is not large enough to hold the current directory
Buffer
is returned and the current file position is not updated.
is the structure returned as the directory entry.
EFI_FILE_INFO
The data was read.
The device has no medium.
The device reported an error.
The file system structures are corrupted.
The
BufferSize
directory entry.
with the size needed to complete the request.
12/12/00
File System Protocol
instance that is the file handle to read data
is too small to read the current
has been updated
BufferSize
197

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Extensible Firmware Interface and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents