diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-12-03 23:22:30 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-12-03 23:22:30 +0000 |
commit | c01a97442f278c557ee36962229b3076b94ae588 (patch) | |
tree | f766b0980796365f51963af43dd737938c01d679 /firmware | |
parent | 31ffd7b1540c42e9cc051dc73a1f3acf77885e5d (diff) |
Removed unused variable, and fixed overflow in free/total calculation. There are still some suspicious things in here...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11656 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/fat.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 3924a5cb89..004e2a78ca 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -169,8 +169,6 @@ struct bpb int secmult; /* bpb_bytspersec / PHYSICAL_SECTOR_SIZE */ }; -int fat_sector_size; - static struct bpb fat_bpbs[NUM_VOLUMES]; /* mounted partition info */ static int update_fsinfo(IF_MV_NONVOID(struct bpb* fat_bpb)); @@ -238,10 +236,10 @@ void fat_size(IF_MV2(int volume,) unsigned long* size, unsigned long* free) struct bpb* fat_bpb = &fat_bpbs[volume]; if (size) *size = (fat_bpb->dataclusters * fat_bpb->bpb_secperclus - * fat_bpb->bpb_bytspersec) / 1024; + * fat_bpb->secmult) / 2; if (free) *free = (fat_bpb->fsinfo.freecount * fat_bpb->bpb_secperclus - * fat_bpb->bpb_bytspersec) / 1024; + * fat_bpb->secmult) / 2; } void fat_init(void) |