Skip to content

Commit

Permalink
nyx: do not spam log on partition restore
Browse files Browse the repository at this point in the history
  • Loading branch information
CTCaer committed Oct 12, 2024
1 parent 81fb318 commit e3eee73
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions nyx/nyx_gui/frontend/fe_emmc_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ static int _restore_emmc_part(emmc_tool_gui_t *gui, char *sd_path, int active_pa
manual_system_maintenance(true);
}

return 0;
return -1;
}
else if (!use_multipart && (((u32)((u64)f_size(&fp) >> (u64)9)) != totalSectors)) // Check total restore size vs emmc size.
{
Expand Down Expand Up @@ -1475,10 +1475,13 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)

if (!res)
s_printf(txt_buf, "#FFDD00 Failed!#\n");
else
else if (res > 0)
s_printf(txt_buf, "Done!\n");

lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, txt_buf);
if (res >= 0)
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, txt_buf);
else
res = 0;
manual_system_maintenance(true);
}
}
Expand Down Expand Up @@ -1508,10 +1511,13 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)

if (!res)
s_printf(txt_buf, "#FFDD00 Failed!#\n");
else
else if (res > 0)
s_printf(txt_buf, "Done!\n");

lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, txt_buf);
if (res >= 0)
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, txt_buf);
else
res = 0;
manual_system_maintenance(true);
}
emmc_gpt_free(&gpt);
Expand Down Expand Up @@ -1544,10 +1550,13 @@ void restore_emmc_selected(emmcPartType_t restoreType, emmc_tool_gui_t *gui)

if (!res)
s_printf(txt_buf, "#FFDD00 Failed!#\n");
else
else if (res > 0)
s_printf(txt_buf, "Done!\n");

lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, txt_buf);
if (res >= 0)
lv_label_ins_text(gui->label_log, LV_LABEL_POS_LAST, txt_buf);
else
res = 0;
manual_system_maintenance(true);
}
}
Expand Down

0 comments on commit e3eee73

Please sign in to comment.