From 0c448d26479804cbd3ef7b7cf6eb8fdfdc491776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Palmer?= Date: Fri, 5 Apr 2024 09:53:58 +0200 Subject: [PATCH] UX: rename exit_app to app_exit to override Ledger exit function --- src/ui.h | 2 +- src/ui_bagl.c | 2 +- src/ui_common.c | 2 +- src/ui_nbgl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui.h b/src/ui.h index 7e2dffbf..e55c1f39 100644 --- a/src/ui.h +++ b/src/ui.h @@ -38,7 +38,7 @@ void ui_initial_screen(void); * @brief Exits the app * */ -void exit_app(void); +void __attribute__((noreturn)) app_exit(void); #ifdef HAVE_BAGL diff --git a/src/ui_bagl.c b/src/ui_bagl.c index c3eb139e..3159f62c 100644 --- a/src/ui_bagl.c +++ b/src/ui_bagl.c @@ -67,7 +67,7 @@ UX_STEP_NOCB(ux_version_step, bnnn_paging, {"Tezos Baking", APPVERSION}); UX_STEP_NOCB(ux_chain_id_step, bnnn_paging, {"Chain", home_context.chain_id}); UX_STEP_NOCB(ux_authorized_key_step, bnnn_paging, {"Public Key Hash", home_context.authorized_key}); UX_STEP_NOCB(ux_hwm_step, bnnn_paging, {"High Watermark", home_context.hwm}); -UX_STEP_CB(ux_idle_quit_step, pb, exit_app(), {&C_icon_dashboard_x, "Quit"}); +UX_STEP_CB(ux_idle_quit_step, pb, app_exit(), {&C_icon_dashboard_x, "Quit"}); UX_FLOW(ux_idle_flow, &ux_app_is_ready_step, diff --git a/src/ui_common.c b/src/ui_common.c index d735c05e..4908c141 100644 --- a/src/ui_common.c +++ b/src/ui_common.c @@ -30,7 +30,7 @@ static void require_pin(void) { os_global_pin_invalidate(); } -void exit_app(void) { +void __attribute__((noreturn)) app_exit(void) { require_pin(); os_sched_exit(-1); } diff --git a/src/ui_nbgl.c b/src/ui_nbgl.c index d5a57caf..20fdc894 100644 --- a/src/ui_nbgl.c +++ b/src/ui_nbgl.c @@ -115,7 +115,7 @@ static void ui_menu_about_baking(void) { } void ui_initial_screen(void) { - nbgl_useCaseHome("Tezos Baking", &C_tezos, NULL, false, ui_menu_about_baking, exit_app); + nbgl_useCaseHome("Tezos Baking", &C_tezos, NULL, false, ui_menu_about_baking, app_exit); } #endif // HAVE_NBGL