diff --git a/format/main.c b/format/main.c index 6c8722c..8364296 100644 --- a/format/main.c +++ b/format/main.c @@ -129,16 +129,22 @@ fprintf(stderr, "Error: fseek failed\n"); exit(0x1); } + // fill in superblock here + + memset(sb, 0, sizeof(struct ubixfs_superBlock)); fwrite(sb,512,1,fd); - /* Write BAT */ if (fseek(fd,batSect * 512,0x0) != 0x0) { fprintf(stderr, "Error: fseek failed\n"); exit(0x1); } - memset(sector,0x69,512); - fwrite(sector,512,batSize,fd); + + memset(sector, 0 ,512); + sector[0] = 128; // mark the superblock block marked + fwrite(sector, 512, 1, fd); + sector[0] = 0; // zero it out again + fwrite(sector, 512, batSize-1, fd); /* Print debug info */ printf("blocks: [%i]\n",blocks); @@ -159,6 +165,9 @@ /*** $Log$ + Revision 1.3 2004/09/03 09:24:27 reddawg + Disk Tools Work + Revision 1.2 2004/09/03 08:15:09 reddawg ok