Efi_block_io.writeblocks(), Writeblocks(), Func – Intel Extensible Firmware Interface User Manual

Page 407

Advertising
background image

Protocols

— Bootable Image Support

Version 1.10

12/01/02

11-47

EFI_BLOCK_IO.WriteBlocks()

Summary

Writes a specified number of blocks 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 the

BLOCK_IO

protocol description.

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 the

BLOCK_IO

protocol description.

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

.

Advertising