diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-10-15 11:53:38 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-10-15 11:59:35 -0400 |
commit | 1ece63d0547aaef7338df21b45b8a0243c89948d (patch) | |
tree | 21e9c3072d7782e8bf4b9872d37e7feb89dfd15b | |
parent | 37652c5e2bdcc86191cce5b845c0068b3a2b8e25 (diff) | |
download | rockbox-1ece63d054.tar.gz rockbox-1ece63d054.zip |
debug: Log our logical sector multiplier, if enabled.
Change-Id: I077c0a88d8a51d909ff1df1ca79d95c884ba324a
-rw-r--r-- | apps/debug_menu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 8e16ff1c21..a1b9e0018c 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1430,11 +1430,11 @@ static int disk_callback(int btn, struct gui_synclist *lists) simplelist_addline( "Firmware: %s", buf); - uint64_t total_sectors = identify_info[60] | (identify_info[61] << 16); + uint64_t total_sectors = identify_info[60] | ((uint32_t)identify_info[61] << 16); #ifdef HAVE_LBA48 if (identify_info[83] & 0x0400 && total_sectors == 0x0FFFFFFF) - total_sectors = identify_info[100] | (identify_info[101] << 16) | ((uint64_t)identify_info[102] << 32) | ((uint64_t)identify_info[103] << 48); + total_sectors = identify_info[100] | ((uint64_t)identify_info[101] << 16) | ((uint64_t)identify_info[102] << 32) | ((uint64_t)identify_info[103] << 48); #endif uint32_t sector_size; @@ -1450,6 +1450,9 @@ static int disk_callback(int btn, struct gui_synclist *lists) simplelist_addline("Size: %llu MB", total_sectors); simplelist_addline("Logical sector size: %u B", sector_size); +#ifdef MAX_LOG_SECTOR_SIZE + simplelist_addline("Sector multiplier: %u", disk_get_sector_multiplier()); +#endif if((identify_info[106] & 0xe000) == 0x6000) sector_size *= BIT_N(identify_info[106] & 0x000f); |