mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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:
parent
099df2fb71
commit
3502e70366
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue