11/* BareMetal File System Utility */
22/* Written by Ian Seyler of Return Infinity */
3- /* v1.2.3 (2017 04 07 ) */
3+ /* v1.2.4 (2023 06 26 ) */
44
55/* Global includes */
66#include <stdio.h>
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
180180 }
181181 else
182182 {
183- printf ("Error: Invalid file size.\n" );
183+ printf ("Error: Invalid file size.\n" );
184184 }
185185 }
186186 else
@@ -231,7 +231,7 @@ int findfile(char *filename, struct BMFSEntry *fileentry, int *entrynumber)
231231 {
232232 tint = 64 ;
233233 }
234- else if (entry .FileName [0 ] == 0x01 ) // Emtpy entry
234+ else if (entry .FileName [0 ] == 0x01 ) // Empty entry
235235 {
236236 // Ignore
237237 }
@@ -263,7 +263,7 @@ void list(void)
263263 {
264264 tint = 64 ;
265265 }
266- else if (entry .FileName [0 ] == 0x01 ) // Emtpy entry
266+ else if (entry .FileName [0 ] == 0x01 ) // Empty entry
267267 {
268268 // Ignore
269269 }
@@ -279,11 +279,11 @@ void format(void)
279279{
280280 memset (DiskInfo , 0 , 512 );
281281 memset (Directory , 0 , 4096 );
282- memcpy (DiskInfo , fs_tag , 4 ); // Add the 'BMFS' tag
283- fseek (disk , 1024 , SEEK_SET ); // Seek 1KiB in for disk information
284- fwrite (DiskInfo , 512 , 1 , disk ); // Write 512 bytes for the DiskInfo
285- fseek (disk , 4096 , SEEK_SET ); // Seek 4KiB in for directory
286- fwrite (Directory , 4096 , 1 , disk ); // Write 4096 bytes for the Directory
282+ memcpy (DiskInfo , fs_tag , 4 ); // Add the 'BMFS' tag
283+ fseek (disk , 1024 , SEEK_SET ); // Seek 1KiB in for disk information
284+ fwrite (DiskInfo , 512 , 1 , disk ); // Write 512 bytes for the DiskInfo
285+ fseek (disk , 4096 , SEEK_SET ); // Seek 4KiB in for directory
286+ fwrite (Directory , 4096 , 1 , disk ); // Write 4096 bytes for the Directory
287287}
288288
289289
0 commit comments