#[repr(C)]pub struct BlockIO { /* private fields */ }
Expand description
The Block I/O protocol.
Implementations
Pointer for block IO media.
Read the requested number of blocks from the device.
Arguments
media_id
- The media ID that the read request is for.lba
- The starting logical block address to read from on the device.buffer
- The target buffer of the read operation
Errors
uefi::Status::DEVICE_ERROR
The device reported an error while attempting to perform the read operation.uefi::Status::NO_MEDIA
There is no media in the device.uefi::Status::MEDIA_CHANGED
Themedia_id
is not for the current media.uefi::Status::BAD_BUFFER_SIZE
The buffer size parameter is not a multiple of the intrinsic block size of the device.uefi::Status::INVALID_PARAMETER
The read request contains LBAs that are not valid, or the buffer is not on proper alignment.
Writes the requested number of blocks to the device.
Arguments
media_id
The media ID that the write request is for.lba
The starting logical block address to be written.buffer
Buffer to be written
Errors
uefi::Status::WRITE_PROTECTED
The device cannot be written to.uefi::Status::NO_MEDIA
There is no media in the device.uefi::Status::MEDIA_CHANGED
Themedia_id
is not for the current media.uefi::Status::DEVICE_ERROR
The device reported an error while attempting to perform the write operation.uefi::Status::BAD_BUFFER_SIZE
The buffer size parameter is not a multiple of the intrinsic block size of the device.uefi::Status::INVALID_PARAMETER
The write request contains LBAs that are not valid, or the buffer is not on proper alignment.
Flushes all modified data to a physical block device.
Errors
uefi::Status::DEVICE_ERROR
The device reported an error while attempting to write data.uefi::Status::NO_MEDIA
There is no media in the device.