1
0
Fork 0
forked from len0rd/rockbox

FiiO M3K: remove the bootloader install debug menu

This menu serves no useful purpose anymore. I plan on adding an
improved version of this functionality to the bootloader instead.

Change-Id: I6a93625789f7192031eb6cee6708f9a867318622
This commit is contained in:
Aidan MacDonald 2021-04-25 14:32:21 +01:00
parent 557ff6a981
commit c37555d30d

View file

@ -126,10 +126,6 @@
#include "bootdata.h" #include "bootdata.h"
#endif #endif
#ifdef FIIO_M3K
#include "installer.h"
#endif
static const char* threads_getname(int selected_item, void *data, static const char* threads_getname(int selected_item, void *data,
char *buffer, size_t buffer_len) char *buffer, size_t buffer_len)
{ {
@ -2495,52 +2491,6 @@ static bool dbg_boot_data(void)
} }
#endif /* defined(HAVE_BOOTDATA) && !defined(SIMULATOR) */ #endif /* defined(HAVE_BOOTDATA) && !defined(SIMULATOR) */
#if defined(FIIO_M3K) && !defined(SIMULATOR)
/* Note: this is temporary and should NOT be merged, ensure it is removed */
static int fiio_debug_menu_action_callback(int action, struct gui_synclist *lists)
{
if(action == ACTION_REDRAW) {
simplelist_set_line_count(0);
simplelist_addline("Back to menu");
simplelist_addline("Install bootloader");
simplelist_addline("Dump bootloader");
action = ACTION_REDRAW;
}
if(action == ACTION_STD_OK) {
int sel = gui_synclist_get_sel_pos(lists);
int rc = 0;
switch(sel) {
case 1:
rc = install_bootloader("/boot.install");
break;
case 2:
rc = dump_bootloader("/boot.dump");
break;
default:
break;
}
if(sel == 1 || sel == 2) {
const char* msg = installer_strerror(rc);
splashf(3*HZ, "(%d) %s", rc, msg);
}
action = ACTION_STD_CANCEL;
}
return action;
}
static bool dbg_fiio_menu(void)
{
struct simplelist_info info;
simplelist_info_init(&info, "FiiO debug menu", 3, NULL);
info.action_callback = fiio_debug_menu_action_callback;
return simplelist_show_list(&info);
}
#endif
/****** The menu *********/ /****** The menu *********/
static const struct { static const struct {
unsigned char *desc; /* string or ID */ unsigned char *desc; /* string or ID */
@ -2648,9 +2598,6 @@ static const struct {
#if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) #if defined(HAVE_BOOTDATA) && !defined(SIMULATOR)
{"Boot data", dbg_boot_data }, {"Boot data", dbg_boot_data },
#endif #endif
#if defined(FIIO_M3K) && !defined(SIMULATOR)
{"FiiO debug menu", dbg_fiio_menu},
#endif
}; };
static int menu_action_callback(int btn, struct gui_synclist *lists) static int menu_action_callback(int btn, struct gui_synclist *lists)