Read
(address: u32)
| 89 | |
| 90 | // Read |
| 91 | pub fn read(address: u32) -> Self |
| 92 | { |
| 93 | let mut buffer = [0; crate::fs::ata::BLKSIZE]; |
| 94 | if let Some(ref blkdev) = *crate::fs::blkdev::BLKDEV.lock() |
| 95 | { |
| 96 | if blkdev.read(address, &mut buffer).is_err() |
| 97 | { |
| 98 | serprintln!("[ERR] COULD NOT READ LIBFS BLOCK {:#x}", address); |
| 99 | } |
| 100 | } |
| 101 | Self |
| 102 | { |
| 103 | address, |
| 104 | buffer, |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | // Write |
| 109 | pub fn write(&self) |
no test coverage detected