summaryrefslogtreecommitdiff
path: root/mkfs.aya/src/block_device.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs.aya/src/block_device.rs')
-rw-r--r--mkfs.aya/src/block_device.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/mkfs.aya/src/block_device.rs b/mkfs.aya/src/block_device.rs
new file mode 100644
index 0000000..295b357
--- /dev/null
+++ b/mkfs.aya/src/block_device.rs
@@ -0,0 +1,5 @@
+pub(crate) const BLOCK_SIZE: usize = 4096;
+pub(crate) trait BlockDevice {
+ fn read(&self, block_id: usize, buffer: &mut [u8]);
+ fn write(&self, block_id: usize, buffer: &[u8]);
+} \ No newline at end of file