#[repr(C)]
pub struct BlockIO { /* private fields */ }
Expand description

The Block I/O protocol.

Implementations

Pointer for block IO media.

Resets the block device hardware.

Arguments
  • extended_verification Indicates that the driver may perform a more exhaustive verification operation of the device during reset.
Errors
  • uefi::Status::DEVICE_ERROR The block device is not functioning correctly and could not be reset.

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 The media_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 The media_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.

Trait Implementations

Unique protocol identifier.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.