From c14429c4452ab970d9c1c5d9d2ab27d4a8a60604 Mon Sep 17 00:00:00 2001 From: matejcik Date: Tue, 11 Feb 2020 11:25:09 +0100 Subject: [PATCH] all: shut down emulator on error_shutdown --- core/embed/unix/common.c | 4 +--- legacy/emulator/setup.c | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/embed/unix/common.c b/core/embed/unix/common.c index f2f56bbb2..ef9434d4e 100644 --- a/core/embed/unix/common.c +++ b/core/embed/unix/common.c @@ -102,9 +102,7 @@ error_shutdown(const char *line1, const char *line2, const char *line3, printf("\nPlease unplug the device.\n"); display_backlight(255); hal_delay(5000); - __shutdown(); - for (;;) - ; + exit(4); } void hal_delay(uint32_t ms) { usleep(1000 * ms); } diff --git a/legacy/emulator/setup.c b/legacy/emulator/setup.c index 27990c22a..c300b53e6 100644 --- a/legacy/emulator/setup.c +++ b/legacy/emulator/setup.c @@ -53,7 +53,8 @@ void setup(void) { } void __attribute__((noreturn)) shutdown(void) { - for (;;) pause(); + sleep(5); + exit(4); } void emulatorRandom(void *buffer, size_t size) {