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

Method read

src/fs/sblk.rs:90–105  ·  view source on GitHub ↗

Read

()

Source from the content-addressed store, hash-verified

88
89 // Read
90 pub fn read() -> Self
91 {
92 let blk = Blk::read(SBLK_ADDR);
93 let data = blk.data();
94 // TODO: Add debugging message
95 // serprint!(&data[0..8], SIG);
96
97 Self
98 {
99 sig: SIG,
100 vers: data[5],
101 blksize: 2 << (8 + data[9] as u32),
102 blkcount: u32::from_be_bytes(data[10..14].try_into().unwrap()),
103 alloc_count: u32::from_be_bytes(data[14..18].try_into().unwrap()),
104 }
105 }
106
107 // Write
108 pub fn write(&self)

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
readFunction · 0.70

Tested by

no test coverage detected