diff --git a/ios_mcp/source/options/ShowExtCsd.c b/ios_mcp/source/options/ShowExtCsd.c index dcee99e..606f140 100644 --- a/ios_mcp/source/options/ShowExtCsd.c +++ b/ios_mcp/source/options/ShowExtCsd.c @@ -34,9 +34,6 @@ void option_ShowExtCsd(void) return; } - // Lock blkdrv so it won't interfere with our custom commands - MDBlkDrv_Lock(fsaHandle, blkDrvIndex); - uint8_t* ext_csd = (uint8_t*) IOS_HeapAllocAligned(CROSS_PROCESS_HEAP_ID, 0x200, 0x20); if (!ext_csd) { gfx_set_font_color(COLOR_ERROR); @@ -44,6 +41,10 @@ void option_ShowExtCsd(void) waitButtonInput(); return; } + + // Lock blkdrv so it won't interfere with our custom commands + MDBlkDrv_Lock(fsaHandle, blkDrvIndex); + gfx_print(16, index, 0, "Submitting command..."); index += CHAR_SIZE_DRC_Y + 4; @@ -70,35 +71,35 @@ void option_ShowExtCsd(void) uint8_t ext_csd_rev = ext_csd[192]; const char* str; - switch (ext_csd_rev) { - case 8: - str = "5.1"; - break; - case 7: - str = "5.0"; - break; - case 6: - str = "4.5"; - break; - case 5: - str = "4.41"; - break; - case 3: - str = "4.3"; - break; - case 2: - str = "4.2"; - break; - case 1: - str = "4.1"; - break; - case 0: - str = "4.0"; - break; - default: - str = "Invalid revision"; + switch (ext_csd_rev) { + case 8: + str = "5.1"; + break; + case 7: + str = "5.0"; break; - } + case 6: + str = "4.5"; + break; + case 5: + str = "4.41"; + break; + case 3: + str = "4.3"; + break; + case 2: + str = "4.2"; + break; + case 1: + str = "4.1"; + break; + case 0: + str = "4.0"; + break; + default: + str = "Invalid revision"; + break; + } gfx_printf(16, index, 0, "Extended CSD rev 1.%d (MMC %s)", ext_csd_rev, str); index += CHAR_SIZE_DRC_Y + 4; @@ -106,14 +107,14 @@ void option_ShowExtCsd(void) gfx_printf(16, index, 0, "S_CMD_SET: 0x%02x", ext_csd[504]); index += CHAR_SIZE_DRC_Y + 4; - gfx_printf(16, index, 0, "BKOPS_SUPPORT: 0x%02x", ext_csd[502]); + gfx_printf(16, index, 0, "BKOPS_SUPPORT: 0x%02x", ext_csd[502]); index += CHAR_SIZE_DRC_Y + 4; - if (ext_csd_rev >= 5) { - gfx_printf(16, index, 0, "BKOPS_EN: 0x%02x", ext_csd[163]); + if (ext_csd_rev >= 5) { + gfx_printf(16, index, 0, "BKOPS_EN: 0x%02x", ext_csd[163]); index += CHAR_SIZE_DRC_Y + 4; - gfx_printf(16, index, 0, "BKOPS_STATUS: 0x%02x", ext_csd[246]); + gfx_printf(16, index, 0, "BKOPS_STATUS: 0x%02x", ext_csd[246]); index += CHAR_SIZE_DRC_Y + 4; }