Function readBlocks [src]

Reads the number of requested blocks from the device.

Prototype

pub fn readBlocks(self: *Self, media_id: u32, lba: u64, buf: []u8) ReadBlocksError!void

Parameters

self: *Selfmedia_id: u32lba: u64buf: []u8

Possible Errors

BadBufferSize
DeviceError
InvalidParameter
NoMedia
Unexpected UnexpectedError

Source

pub fn readBlocks(self: *Self, media_id: u32, lba: u64, buf: []u8) ReadBlocksError!void { switch (self._read_blocks(self, media_id, lba, buf.len, buf.ptr)) { .success => {}, .device_error => return Error.DeviceError, .no_media => return Error.NoMedia, .bad_buffer_size => return Error.BadBufferSize, .invalid_parameter => return Error.InvalidParameter, else => |status| return uefi.unexpectedStatus(status), } }