diff --git a/src/tools/Makefile b/src/tools/Makefile index e0a93b3..690e258 100644 --- a/src/tools/Makefile +++ b/src/tools/Makefile @@ -48,8 +48,9 @@ (cp ../bin/cp/cp ./) #(cp ../bin/format/format ./) (./format 50 2000 /dev/fd0 ubix.elf 0 format 3754 fdisk 3754 ROM8X14.DPF 3754 init 3754 login 3754 shell 3754 userdb 3754 ls 3754 motd 3754 cp 3754) + (./format 200 2000 /dev/md1 ubix.elf 0 format 3754 fdisk 3754 ROM8X14.DPF 3754 init 3754 login 3754 shell 3754 userdb 3754 ls 3754 motd 3754 cp 3754) (./format 1064 2000 /dev/fd0 shell 3754 clock 3754) - #(./format 63 2000 /dev/md1 ubix.elf 0 shell 3754 motd 3754 libc.so 3754) + #(./format 200 2000 /dev/md1 ubix.elf 0 shell 3754 motd 3754 libc.so 3754) (rm -fr ubix.elf) (rm -fr login) (rm -fr init) diff --git a/src/tools/format.c b/src/tools/format.c index bc86cb4..1f8fea1 100644 --- a/src/tools/format.c +++ b/src/tools/format.c @@ -70,21 +70,21 @@ sprintf(dirEntry[1].fileName,".."); BAT[0].nextBlock = 0x1; BAT[0].attributes = 1; - BAT[0].realSector = (batSize/512) + 64; + BAT[0].realSector = (batSize/512); BAT[1].nextBlock = 0x2; BAT[1].attributes = 1; - BAT[1].realSector = ((batSize/512) + 1 * 8) + 64; + BAT[1].realSector = ((batSize/512) + 1 * 8); BAT[2].nextBlock = 0x3; BAT[2].attributes = 1; - BAT[2].realSector = ((batSize/512) + 2 * 8) + 64; + BAT[2].realSector = ((batSize/512) + 2 * 8); BAT[3].nextBlock = -1; BAT[3].attributes = 1; - BAT[3].realSector = ((batSize/512) + 3 * 8) + 64; + BAT[3].realSector = ((batSize/512) + 3 * 8); for (i=4;i<(size/4096);i++) { BAT[i].nextBlock = -1; BAT[i].attributes = 0x0; - BAT[i].realSector = ((batSize/512) + (i*8)) + 64; + BAT[i].realSector = ((batSize/512) + (i*8)); BAT[i].reserved = 0x0; } file = 0x2; @@ -132,10 +132,10 @@ dirEntry[1].size = 0x4000; sprintf(dirEntry[1].fileName,"fakeDir"); rewind(driveFd); - fseek(driveFd,(long)(((64 + startSector) * 512) + batSize),0); + fseek(driveFd,(long)(((startSector) * 512) + batSize),0); fwrite(dirEntry,0x4000,1,driveFd); rewind(driveFd); - fseek(driveFd,((startSector + 64) * 512),0); + fseek(driveFd,((startSector) * 512),0); if (fwrite(BAT,batSize,1,driveFd) >= 1) { /* * printf("size [%i]\n",partInfo->size);