mkfat: zero out disk as part of format
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
723143e36f
commit
cf239b9b7a
@ -159,5 +159,13 @@ int fat12_mkfs(struct pang_io *io, uint32_t bytes) {
|
||||
offset += sector_size;
|
||||
}
|
||||
|
||||
// Fill in the rest of the disk
|
||||
while (offset < bytes) {
|
||||
if (pang_write(io, offset, mbr, sizeof(mbr)) != sizeof(mbr)) {
|
||||
return -1;
|
||||
}
|
||||
offset += sector_size;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user