Block I/O Protocol
Version 1.02 12/12/00 179
8.1.3 EFI_BLOCK_IO.WriteBlocks()
Summary
Writes a specified number of bloc ks to the device.
Prototype
EFI_STATUS
(EFIAPI *EFI_BLOCK_WRITE) (
IN EFI_BLOCK_IO *This,
IN UINT32 MediaId,
IN EFI_LBA LBA,
IN UINTN BufferSize,
IN 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 write request is for.
LBA The starting logical block address to be written. The caller is responsible
for writing to only legitimate locations. Type EFI_LBA is defined in
Section 8.1.
BufferSize The size in bytes of Buffer. This must be a multiple of the intrinsic
block size of the device.
Buffer A pointer to the source buffer for the data.
Description
The WriteBlocks() function writes the requested number of blocks to the device. All blocks
are written, 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.