summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-05 09:33:45 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-06 16:42:26 -0500
commitbc3fa5393762549a16f9de3e238a986607015fe3 (patch)
treed577f828c6fbd5011be7d477a492818837e75e78 /apps
parentee87bfb933cdb595718bd8ddadf6552c3fa8895d (diff)
downloadrockbox-bc3fa5393762549a16f9de3e238a986607015fe3.tar.gz
rockbox-bc3fa5393762549a16f9de3e238a986607015fe3.zip
Sansa Multiboot Root Redirect Enhance + bug fix
filename buffer was too small to retrieve redirect path if redirected to sd root remove <SD1> as it is redundant Change-Id: I1326601f1ba4a18d6bc173798759eb762b55528c
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 1b341a96e4..6b76aac162 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -2526,20 +2526,21 @@ static bool dbg_skin_engine(void)
2526#if defined(HAVE_BOOTDATA) && !defined(SIMULATOR) 2526#if defined(HAVE_BOOTDATA) && !defined(SIMULATOR)
2527static bool dbg_boot_data(void) 2527static bool dbg_boot_data(void)
2528{ 2528{
2529 unsigned int crc = 0; 2529 unsigned int crc = crc_32(boot_data.payload, boot_data.length, 0xffffffff);
2530 struct simplelist_info info; 2530 struct simplelist_info info;
2531 info.scroll_all = true; 2531 info.scroll_all = true;
2532 simplelist_info_init(&info, "Boot data", 1, NULL); 2532 simplelist_info_init(&info, "Boot data", 1, NULL);
2533 simplelist_set_line_count(0); 2533 simplelist_set_line_count(0);
2534 crc = crc_32(boot_data.payload, boot_data.length, 0xffffffff); 2534
2535#if defined(HAVE_MULTIBOOT) 2535#if defined(HAVE_MULTIBOOT)
2536 char rootpath[VOL_MAX_LEN+2] = RB_ROOT_CONTENTS_DIR; 2536 char rootpath[MAX_PATH / 2] = RB_ROOT_CONTENTS_DIR;
2537 int boot_volume = 0; 2537 int boot_volume = 0;
2538 if(crc == boot_data.crc) 2538 if(crc == boot_data.crc)
2539 { 2539 {
2540 boot_volume = boot_data.boot_volume; /* boot volume contained in uint8_t payload */ 2540 boot_volume = boot_data.boot_volume; /* boot volume contained in uint8_t payload */
2541 get_redirect_dir(rootpath, sizeof(rootpath), boot_volume, "", ""); 2541 int rtlen = get_redirect_dir(rootpath, sizeof(rootpath), boot_volume, "", "");
2542 rootpath[path_strip_trailing_separators(rootpath,NULL)] = '\0'; 2542 while (rtlen > 0 && rootpath[--rtlen] == PATH_SEPCH) /* remove extra separators */
2543 rootpath[rtlen] = '\0';
2543 } 2544 }
2544 simplelist_addline("Boot Volume: <%lu>", boot_volume); 2545 simplelist_addline("Boot Volume: <%lu>", boot_volume);
2545 simplelist_addline("Root:"); 2546 simplelist_addline("Root:");