Prompt the user when flash_suggest_update_bootloader()

pm3line_init() delayed to not install signal handlers on other usages than interactive client
This commit is contained in:
Philippe Teuwen committed 2026-08-19 15:51:54 +02:00
1 parent 2dfe6c85a4
commit f82ac61e78
2 files changed
+9 -1

No files matched your search

+7
View File
@@ -577,6 +577,13 @@ static void flash_suggest_update_bootloader(void) {
PrintAndLogEx(INFO, "---------------------------------------------------");
PrintAndLogEx(NORMAL, "");
gs_printed_msg = true;
if (g_session.stdinOnTTY) {
PrintAndLogEx(INFO, "Press ENTER to continue or CTRL-C to cancel...");
fflush(stdout);
while (kbd_enter_pressed() == false) {
msleep(100);
}
}
}
// If the device's boot is newer than the current flasher, we can suggest the user update the flasher.
+2 -1
View File
@@ -1073,7 +1073,6 @@ int main(int argc, char *argv[]) {
char *port = NULL;
uint32_t speed = 0;
pm3line_init();
char exec_name[100] = {0};
strncpy(exec_name, basename(argv[0]), sizeof(exec_name) - 1);
@@ -1522,6 +1521,8 @@ int main(int argc, char *argv[]) {
}
*/
pm3line_init();
#ifdef HAVE_GUI
# if defined(_WIN32) || (defined(__MACH__) && defined(__APPLE__))