Fix Free and Disk size display when SECTOR_SIZE!=512

Flyspray: FS#10656
Author: Laurent Papier 



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23595 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2009-11-09 22:53:54 +00:00
parent 099df2fb71
commit 3502e70366

View file

@ -247,9 +247,9 @@ void fat_size(IF_MV2(int volume,) unsigned long* size, unsigned long* free)
#endif
struct bpb* fat_bpb = &fat_bpbs[volume];
if (size)
*size = fat_bpb->dataclusters * fat_bpb->bpb_secperclus / 2;
*size = fat_bpb->dataclusters * (fat_bpb->bpb_secperclus * SECTOR_SIZE / 1024);
if (free)
*free = fat_bpb->fsinfo.freecount * fat_bpb->bpb_secperclus / 2;
*free = fat_bpb->fsinfo.freecount * (fat_bpb->bpb_secperclus * SECTOR_SIZE / 1024);
}
void fat_init(void)