Skip to main content

read_sectors

Function read_sectors 

Source
fn read_sectors(
    mem: &mut impl BiosMemory,
    disk: &mut dyn BiosDisk,
    lba: u64,
    count: u64,
    buffer: u32,
) -> Result<(), u8>
Expand description

Reads one sector after another into a guest buffer.

Each byte is written through BiosMemory, so a buffer that leaves mapped memory aborts the transfer with DISK_STATUS_SECTOR_NOT_FOUND instead of panicking. Bytes already written are not rolled back.