summaryrefslogtreecommitdiff
path: root/src/block_device/mod.rs
blob: c7e1362502f9bd6f026880ef80734fc0593a1275 (plain) (blame)
1
2
3
4
5
6
7
8
9
/// Abstracts for block devices.
/// Currently only a mock memory disk.

pub mod memory_disk;
pub const BLOCK_SIZE: usize = 4096;
pub trait BlockDevice {
    fn read(&self, block_id: usize, buffer: &mut [u8]);
    fn write(&self, block_id: usize, buffer: &[u8]);
}