diff --git a/src/mkfat.c b/src/mkfat.c index 18c3439..8b46560 100644 --- a/src/mkfat.c +++ b/src/mkfat.c @@ -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; } \ No newline at end of file