summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorne Wuff <torne@wolfpuppy.org.uk>2010-04-09 11:55:57 +0000
committerTorne Wuff <torne@wolfpuppy.org.uk>2010-04-09 11:55:57 +0000
commit4290051dd8e0655a9f18ec478550f8b01fb16262 (patch)
tree5dbc78e1dcf6d90f44ae5994078b84785fcd1310
parent7686c8fa99d7aa82b00b30ce37fc161c412b94a6 (diff)
downloadrockbox-4290051dd8e0655a9f18ec478550f8b01fb16262.tar.gz
rockbox-4290051dd8e0655a9f18ec478550f8b01fb16262.tar.bz2
rockbox-4290051dd8e0655a9f18ec478550f8b01fb16262.zip
Add drive's reported physical sector size to disk debug screen for ATA devices
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25552 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index fbaae57601..22ec63abe9 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1957,6 +1957,11 @@ static int disk_callback(int btn, struct gui_synclist *lists)
simplelist_addline(SIMPLELIST_ADD_LINE,
"No timing info");
}
+ int sector_size = 512;
+ if((identify_info[106] & 0xe000) == 0x6000)
+ sector_size *= BIT_N(identify_info[106] & 0x000f);
+ simplelist_addline(SIMPLELIST_ADD_LINE,
+ "Physical sector size: %d", sector_size);
#ifdef HAVE_ATA_DMA
if (identify_info[63] & (1<<0)) {
char mdma0[2], mdma1[2], mdma2[2];