Add comments in ch6
This commit is contained in:
parent
cea2febe35
commit
f9346edad1
35 changed files with 374 additions and 116 deletions
|
@ -1,6 +1,9 @@
|
|||
use core::any::Any;
|
||||
|
||||
/// Trait for block devices
|
||||
/// which reads and writes data in the unit of blocks
|
||||
pub trait BlockDevice: Send + Sync + Any {
|
||||
///Read data form block to buffer
|
||||
fn read_block(&self, block_id: usize, buf: &mut [u8]);
|
||||
///Write data from buffer to block
|
||||
fn write_block(&self, block_id: usize, buf: &[u8]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue