summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/fat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 80aaaa13b4..374e951996 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -243,7 +243,7 @@ static int transfer(IF_MV2(struct bpb* fat_bpb,) unsigned long start, long count
243 243
244struct fat_cache_entry 244struct fat_cache_entry
245{ 245{
246 int secnum; 246 long secnum;
247 bool inuse; 247 bool inuse;
248 bool dirty; 248 bool dirty;
249#ifdef HAVE_MULTIVOLUME 249#ifdef HAVE_MULTIVOLUME
@@ -614,7 +614,7 @@ static void flush_fat_sector(struct fat_cache_entry *fce,
614 unsigned char *sectorbuf) 614 unsigned char *sectorbuf)
615{ 615{
616 int rc; 616 int rc;
617 int secnum; 617 long secnum;
618 618
619 /* With multivolume, use only the FAT info from the cached sector! */ 619 /* With multivolume, use only the FAT info from the cached sector! */
620#ifdef HAVE_MULTIVOLUME 620#ifdef HAVE_MULTIVOLUME
@@ -939,7 +939,7 @@ static int update_fsinfo(IF_MV_NONVOID(struct bpb* fat_bpb))
939 struct bpb* fat_bpb = &fat_bpbs[0]; 939 struct bpb* fat_bpb = &fat_bpbs[0];
940#endif 940#endif
941 unsigned char fsinfo[SECTOR_SIZE]; 941 unsigned char fsinfo[SECTOR_SIZE];
942 unsigned int* intptr; 942 unsigned long* intptr;
943 int rc; 943 int rc;
944 944
945#ifdef HAVE_FAT16SUPPORT 945#ifdef HAVE_FAT16SUPPORT
@@ -955,10 +955,10 @@ static int update_fsinfo(IF_MV_NONVOID(struct bpb* fat_bpb))
955 DEBUGF( "flush_fat() - Couldn't read FSInfo (error code %d)\n", rc); 955 DEBUGF( "flush_fat() - Couldn't read FSInfo (error code %d)\n", rc);
956 return rc * 10 - 1; 956 return rc * 10 - 1;
957 } 957 }
958 intptr = (int*)&(fsinfo[FSINFO_FREECOUNT]); 958 intptr = (long*)&(fsinfo[FSINFO_FREECOUNT]);
959 *intptr = SWAB32(fat_bpb->fsinfo.freecount); 959 *intptr = SWAB32(fat_bpb->fsinfo.freecount);
960 960
961 intptr = (int*)&(fsinfo[FSINFO_NEXTFREE]); 961 intptr = (long*)&(fsinfo[FSINFO_NEXTFREE]);
962 *intptr = SWAB32(fat_bpb->fsinfo.nextfree); 962 *intptr = SWAB32(fat_bpb->fsinfo.nextfree);
963 963
964 rc = ata_write_sectors(IF_MV2(fat_bpb->drive,) 964 rc = ata_write_sectors(IF_MV2(fat_bpb->drive,)
@@ -1664,7 +1664,7 @@ int fat_create_dir(const char* name,
1664#endif 1664#endif
1665 unsigned char buf[SECTOR_SIZE]; 1665 unsigned char buf[SECTOR_SIZE];
1666 int i; 1666 int i;
1667 int sector; 1667 long sector;
1668 int rc; 1668 int rc;
1669 struct fat_file dummyfile; 1669 struct fat_file dummyfile;
1670 1670