Format ATA
()
| 197 | |
| 198 | // Format ATA |
| 199 | pub 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 |