diff options
-rw-r--r-- | firmware/drivers/fat.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 4333f55d0d..7951b6b280 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -178,7 +178,7 @@ int fat_mount(int startsector) | |||
178 | err = ata_read_sectors(startsector,1,buf); | 178 | err = ata_read_sectors(startsector,1,buf); |
179 | if(err) | 179 | if(err) |
180 | { | 180 | { |
181 | DEBUGF( "fat_mount() - Couldn't read BPB (error code %i)\n", | 181 | DEBUGF( "fat_mount() - Couldn't read BPB (error code %d)\n", |
182 | err); | 182 | err); |
183 | return -1; | 183 | return -1; |
184 | } | 184 | } |
@@ -265,30 +265,30 @@ static int bpb_is_sane(void) | |||
265 | { | 265 | { |
266 | if(fat_bpb.bpb_bytspersec != 512) | 266 | if(fat_bpb.bpb_bytspersec != 512) |
267 | { | 267 | { |
268 | DEBUGF( "bpb_is_sane() - Error: sector size is not 512 (%i)\n", | 268 | DEBUGF( "bpb_is_sane() - Error: sector size is not 512 (%d)\n", |
269 | fat_bpb.bpb_bytspersec); | 269 | fat_bpb.bpb_bytspersec); |
270 | return -1; | 270 | return -1; |
271 | } | 271 | } |
272 | if(fat_bpb.bpb_secperclus * fat_bpb.bpb_bytspersec > 32768) | 272 | if(fat_bpb.bpb_secperclus * fat_bpb.bpb_bytspersec > 32768) |
273 | { | 273 | { |
274 | DEBUGF( "bpb_is_sane() - Warning: cluster size is larger than 32K " | 274 | DEBUGF( "bpb_is_sane() - Warning: cluster size is larger than 32K " |
275 | "(%i * %i = %i)\n", | 275 | "(%d * %d = %d)\n", |
276 | fat_bpb.bpb_bytspersec, fat_bpb.bpb_secperclus, | 276 | fat_bpb.bpb_bytspersec, fat_bpb.bpb_secperclus, |
277 | fat_bpb.bpb_bytspersec * fat_bpb.bpb_secperclus); | 277 | fat_bpb.bpb_bytspersec * fat_bpb.bpb_secperclus); |
278 | } | 278 | } |
279 | if(fat_bpb.bpb_rsvdseccnt != 1) | 279 | if(fat_bpb.bpb_rsvdseccnt != 1) |
280 | { | 280 | { |
281 | DEBUGF( "bpb_is_sane() - Warning: Reserved sectors is not 1 (%i)\n", | 281 | DEBUGF( "bpb_is_sane() - Warning: Reserved sectors is not 1 (%d)\n", |
282 | fat_bpb.bpb_rsvdseccnt); | 282 | fat_bpb.bpb_rsvdseccnt); |
283 | } | 283 | } |
284 | if(fat_bpb.bpb_numfats != 2) | 284 | if(fat_bpb.bpb_numfats != 2) |
285 | { | 285 | { |
286 | DEBUGF( "bpb_is_sane() - Warning: NumFATS is not 2 (%i)\n", | 286 | DEBUGF( "bpb_is_sane() - Warning: NumFATS is not 2 (%d)\n", |
287 | fat_bpb.bpb_numfats); | 287 | fat_bpb.bpb_numfats); |
288 | } | 288 | } |
289 | if(fat_bpb.bpb_rootentcnt != 512) | 289 | if(fat_bpb.bpb_rootentcnt != 512) |
290 | { | 290 | { |
291 | DEBUGF( "bpb_is_sane() - Warning: RootEntCnt is not 512 (%i)\n", | 291 | DEBUGF( "bpb_is_sane() - Warning: RootEntCnt is not 512 (%d)\n", |
292 | fat_bpb.bpb_rootentcnt); | 292 | fat_bpb.bpb_rootentcnt); |
293 | } | 293 | } |
294 | if(fat_bpb.bpb_media != 0xf0 && fat_bpb.bpb_media < 0xf8) | 294 | if(fat_bpb.bpb_media != 0xf0 && fat_bpb.bpb_media < 0xf8) |
@@ -535,7 +535,7 @@ static int add_dir_entry(unsigned int currdir, struct fat_direntry *de) | |||
535 | if(err) | 535 | if(err) |
536 | { | 536 | { |
537 | DEBUGF( "add_dir_entry() - Couldn't read dir sector" | 537 | DEBUGF( "add_dir_entry() - Couldn't read dir sector" |
538 | " (error code %i)\n", err); | 538 | " (error code %d)\n", err); |
539 | return -1; | 539 | return -1; |
540 | } | 540 | } |
541 | 541 | ||
@@ -601,7 +601,7 @@ static int add_dir_entry(unsigned int currdir, struct fat_direntry *de) | |||
601 | { | 601 | { |
602 | DEBUGF( "add_dir_entry() - " | 602 | DEBUGF( "add_dir_entry() - " |
603 | " Couldn't write dir" | 603 | " Couldn't write dir" |
604 | " sector (error code %i)\n", err); | 604 | " sector (error code %d)\n", err); |
605 | return -1; | 605 | return -1; |
606 | } | 606 | } |
607 | break; | 607 | break; |
@@ -800,7 +800,7 @@ int fat_read( struct fat_file *file, int sectorcount, void* buf ) | |||
800 | (char*)buf+(i*SECTOR_SIZE)); | 800 | (char*)buf+(i*SECTOR_SIZE)); |
801 | if(err) { | 801 | if(err) { |
802 | DEBUGF( "fat_read() - Couldn't read sector %d" | 802 | DEBUGF( "fat_read() - Couldn't read sector %d" |
803 | " (error code %i)\n", sector,err); | 803 | " (error code %d)\n", sector,err); |
804 | return -1; | 804 | return -1; |
805 | } | 805 | } |
806 | 806 | ||
@@ -873,8 +873,8 @@ int fat_opendir(struct fat_dir *dir, unsigned int currdir) | |||
873 | err = ata_read_sectors(sec + fat_bpb.startsector,1,dir->cached_buf); | 873 | err = ata_read_sectors(sec + fat_bpb.startsector,1,dir->cached_buf); |
874 | if(err) | 874 | if(err) |
875 | { | 875 | { |
876 | DEBUGF( "fat_getfirst() - Couldn't read dir sector" | 876 | DEBUGF( "fat_opendir() - Couldn't read dir sector" |
877 | " (error code %i)\n", err); | 877 | " (error code %d)\n", err); |
878 | return -1; | 878 | return -1; |
879 | } | 879 | } |
880 | 880 | ||
@@ -1014,7 +1014,7 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry) | |||
1014 | if(err) | 1014 | if(err) |
1015 | { | 1015 | { |
1016 | DEBUGF( "fat_getnext() - Couldn't read dir sector" | 1016 | DEBUGF( "fat_getnext() - Couldn't read dir sector" |
1017 | " (error code %i)\n", err); | 1017 | " (error code %d)\n", err); |
1018 | return -1; | 1018 | return -1; |
1019 | } | 1019 | } |
1020 | 1020 | ||