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

Function fmtata

src/fs/blkdev.rs:199–214  ·  view source on GitHub ↗

Format ATA

()

Source from the content-addressed store, hash-verified

197
198// Format ATA
199pub fn fmtata()
200{
201 if let Some(sb) = SBlk::new()
202 {
203 // Write sblk
204 sb.write();
205
206 // Write zeros to blkbmaps
207 crate::fs::bmapblk::freeall();
208
209 // Alloc root directory
210 // TODO: Add debug info to check if drive is mounted
211 let root = Directory::root();
212 BMapBlk::alloc(root.address());
213 }
214}
215
216
217// Format memory

Callers

nothing calls this directly

Calls 3

freeallFunction · 0.85
writeMethod · 0.45
addressMethod · 0.45

Tested by

no test coverage detected