hekate/nyx: utilize emmc_end

This commit is contained in:
CTCaer
2022-10-11 04:19:29 +03:00
parent 07695196cb
commit 5392971c2c
13 changed files with 31 additions and 33 deletions

View File

@@ -912,7 +912,7 @@ void dump_emmc_selected(emmcPartType_t dumpType, emmc_tool_gui_t *gui)
}
timer = get_tmr_s() - timer;
sdmmc_storage_end(&emmc_storage);
emmc_end();
if (res && n_cfg.verification && !gui->raw_emummc)
s_printf(txt_buf, "Time taken: %dm %ds.\n#96FF00 Finished and verified!#", timer / 60, timer % 60);
@@ -1536,7 +1536,7 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)
}
timer = get_tmr_s() - timer;
sdmmc_storage_end(&emmc_storage);
emmc_end();
if (res && n_cfg.verification && !gui->raw_emummc)
s_printf(txt_buf, "Time taken: %dm %ds.\n#96FF00 Finished and verified!#", timer / 60, timer % 60);

View File

@@ -474,7 +474,7 @@ void dump_emummc_file(emmc_tool_gui_t *gui)
out_failed:
timer = get_tmr_s() - timer;
sdmmc_storage_end(&emmc_storage);
emmc_end();
if (res)
{
@@ -864,7 +864,7 @@ void dump_emummc_raw(emmc_tool_gui_t *gui, int part_idx, u32 sector_start, u32 r
{
s_printf(gui->txt_buf, "#FFDD00 For formatting USER partition,#\n#FFDD00 BIS keys are needed!#\n");
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, gui->txt_buf);
sdmmc_storage_end(&emmc_storage);
emmc_end();
goto out;
}
@@ -952,7 +952,7 @@ void dump_emummc_raw(emmc_tool_gui_t *gui, int part_idx, u32 sector_start, u32 r
out_failed:
timer = get_tmr_s() - timer;
sdmmc_storage_end(&emmc_storage);
emmc_end();
if (res)
{

View File

@@ -33,8 +33,6 @@ extern hekate_config h_cfg;
extern char *emmcsn_path_impl(char *path, char *sub_dir, char *filename, sdmmc_storage_t *storage);
lv_obj_t *ums_mbox;
typedef struct _emmc_backup_buttons_t
{
lv_obj_t *emmc_boot;

View File

@@ -221,7 +221,7 @@ static void _create_mbox_emummc_raw()
u32 emmc_size_safe = emmc_storage.sec_cnt + 0xC000; // eMMC GPP size + BOOT0/1.
sdmmc_storage_end(&emmc_storage);
emmc_end();
for (int i = 1; i < 4; i++)
{
@@ -838,7 +838,7 @@ static lv_res_t _create_mbox_emummc_migrate(lv_obj_t *btn)
backup = backup && rawnand_backup;
sd_unmount();
sdmmc_storage_end(&emmc_storage);
emmc_end();
// Check available types and enable the corresponding buttons.
if (backup)

View File

@@ -376,7 +376,7 @@ static lv_res_t _create_mbox_cal0(lv_obj_t *btn)
out:
free(txt_buf);
sd_unmount();
sdmmc_storage_end(&emmc_storage);
emmc_end();
lv_mbox_add_btns(mbox, mbox_btn_map, _cal0_dump_window_action);
@@ -1132,7 +1132,7 @@ static lv_res_t _create_mbox_emmc_sandisk_report(lv_obj_t * btn)
}
int res = sdmmc_storage_vendor_sandisk_report(&emmc_storage, buf);
sdmmc_storage_end(&emmc_storage);
emmc_end();
if (!res)
{
@@ -1516,7 +1516,7 @@ error:
if (sd_bench)
sd_unmount();
else
sdmmc_storage_end(&emmc_storage);
emmc_end();
out:
free(txt_buf);
@@ -1789,7 +1789,7 @@ static lv_res_t _create_window_emmc_info_status(lv_obj_t *btn)
}
out:
sdmmc_storage_end(&emmc_storage);
emmc_end();
free(txt_buf);
return LV_RES_OK;

View File

@@ -124,7 +124,7 @@ bool get_autorcm_status(bool toggle)
out:
free(tempbuf);
sdmmc_storage_end(&emmc_storage);
emmc_end();
return enabled;
}
@@ -1422,7 +1422,7 @@ out_free:
free(loader);
free(pkg2);
free(txt_buf);
sdmmc_storage_end(&emmc_storage);
emmc_end();
sd_unmount();
if (kb >= KB_FIRMWARE_VERSION_620)

View File

@@ -63,7 +63,7 @@ char *emmcsn_path_impl(char *path, char *sub_dir, char *filename, sdmmc_storage_
else
{
itoa(emmc_storage.cid.serial, emmc_sn, 16);
sdmmc_storage_end(&emmc_storage);
emmc_end();
}
}
else