summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-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:");