MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / read

Method read

src/fs/blk.rs:91–106  ·  view source on GitHub ↗

Read

(address: u32)

Source from the content-addressed store, hash-verified

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)

Callers 9

read_data_portMethod · 0.45
wait_for_readMethod · 0.45
wait_for_writeMethod · 0.45
read_scancodeFunction · 0.45
receiveMethod · 0.45
mask_readMethod · 0.45
cur_showMethod · 0.45
get_attributectl_regFunction · 0.45
set_attributectl_regFunction · 0.45

Calls 2

lockMethod · 0.80
readFunction · 0.70

Tested by

no test coverage detected