Block I/O Protocol
Version 1.02 12/12/00 177
8.1.2 EFI_BLOCK_IO.ReadBlocks()
Summary
Reads the requested number of blocks from the device.
Prototype
EFI_STATUS
(EFIAPI *EFI_BLOCK_READ) (
IN EFI_BLOCK_IO *This,
IN UINT32 MediaId,
IN EFI_LBA LBA,
IN UINTN BufferSize,
OUT VOID *Buffer
);
Parameters
This Indicates a pointer to the calling context. Type EFI_BLOCK_IO is
defined in Section 8.1.
MediaId The media id that the read request is for.
LBA The starting logical block address to read from on the device. Type
EFI_LBA is defined in Section 8.1.
BufferSize The size of the Buffer in bytes. This must be a multiple of the intrinsic
block size of the device.
Buffer A pointer to the destination buffer for the data. The caller is responsible
for either having implicit or explicit ownership of the buffer.
Description
The ReadBlocks() function reads the requested number of blocks from the device. All the
blocks are read, or an error is returned.
If there is no media in the device, the function returns EFI_NO_MEDIA. If the MediaId is not
the id for the current media in the device, the function returns EFI_MEDIA_CHANGED.