summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-04-06 00:17:02 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-04-06 00:17:02 +0000
commitef1698e6487e8954648f806c02428ff691139438 (patch)
tree81d2d066bffd70b5933edcbbd14c991bfa487bea
parentd4241b0f62f6cce7d649faa97888722028d24813 (diff)
downloadrockbox-ef1698e6487e8954648f806c02428ff691139438.tar.gz
rockbox-ef1698e6487e8954648f806c02428ff691139438.tar.bz2
rockbox-ef1698e6487e8954648f806c02428ff691139438.zip
Added cluster size to the disk debug screen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4469 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c8
-rw-r--r--firmware/drivers/fat.c5
-rw-r--r--firmware/export/fat.h1
3 files changed, 13 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index c1d54ccf97..02b86feefc 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1253,7 +1253,7 @@ static bool dbg_disk_info(void)
bool done = false;
int i;
int page = 0;
- const int max_page = 10;
+ const int max_page = 11;
unsigned short* identify_info = ata_get_identify();
bool timing_info_present = false;
char pio3[2], pio4[2];
@@ -1374,6 +1374,12 @@ static bool dbg_disk_info(void)
lcd_puts(0, y++, "No timing info");
}
break;
+
+ case 11:
+ lcd_puts(0, y++, "Cluster size");
+ snprintf(buf, 128, "%d bytes", fat_get_cluster_size());
+ lcd_puts(0, y++, buf);
+ break;
}
lcd_update();
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 3e43e1c787..0c8997d94a 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -1989,3 +1989,8 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry)
}
return 0;
}
+
+int fat_get_cluster_size(void)
+{
+ return fat_bpb.bpb_secperclus * SECTOR_SIZE;
+}
diff --git a/firmware/export/fat.h b/firmware/export/fat.h
index dbc0ab20cc..db8737cfd3 100644
--- a/firmware/export/fat.h
+++ b/firmware/export/fat.h
@@ -94,5 +94,6 @@ extern int fat_rename(struct fat_file* file,
extern int fat_opendir(struct fat_dir *ent, unsigned int currdir);
extern int fat_getnext(struct fat_dir *ent, struct fat_direntry *entry);
+extern int fat_get_cluster_size(void);
#endif