Skip to content

Commit 1893a5e

Browse files
committed
lk2nd: device: menu: Let "Recovery" option boot into recovery directly
1 parent fbb6cfa commit 1893a5e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lk2nd/device/menu/menu.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "../device.h"
2020

2121
// Defined in app/aboot/aboot.c
22+
extern unsigned boot_into_recovery;
2223
extern void cmd_continue(const char *arg, void *data, unsigned sz);
2324

2425
#define FONT_WIDTH (5+1)
@@ -123,7 +124,10 @@ static uint16_t wait_key(void)
123124

124125
static void opt_continue(void) { cmd_continue(NULL, NULL, 0); }
125126
static void opt_reboot(void) { reboot_device(0); }
126-
static void opt_recovery(void) { reboot_device(RECOVERY_MODE); }
127+
static void opt_recovery(void) {
128+
boot_into_recovery = 1;
129+
cmd_continue(NULL, NULL, 0);
130+
}
127131
static void opt_bootloader(void) { reboot_device(FASTBOOT_MODE); }
128132
static void opt_edl(void) { reboot_device(EMERGENCY_DLOAD); }
129133
static void opt_shutdown(void) { shutdown_device(); }

0 commit comments

Comments
 (0)