summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-11-12 11:32:26 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-11-12 11:32:26 +0000
commit6fb512aba58bf221cdfcfc2a3df2148e8527883c (patch)
treee8ee8149ecf862068b7d70b2ec28ca04678227c6 /firmware/drivers/fat.c
parent8a727cecdbb6f4efcea3a1b98cc1463825bdc499 (diff)
Added disk space to Info menu item. (Players press + to see it.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2837 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index ad1a7a0c82..38223edc6a 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -223,6 +223,14 @@ int fat_startsector(void)
return fat_bpb.startsector;
}
+void fat_size(unsigned int* size, unsigned int* free)
+{
+ if (size)
+ *size = fat_bpb.dataclusters * fat_bpb.bpb_secperclus / 2;
+ if (free)
+ *free = fat_bpb.fsinfo.freecount * fat_bpb.bpb_secperclus / 2;
+}
+
int fat_mount(int startsector)
{
unsigned char buf[SECTOR_SIZE];