diff options
Diffstat (limited to 'apps/plugins/plugin_crt0.c')
-rw-r--r-- | apps/plugins/plugin_crt0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/plugins/plugin_crt0.c b/apps/plugins/plugin_crt0.c index 680bb0723d..5564c5575f 100644 --- a/apps/plugins/plugin_crt0.c +++ b/apps/plugins/plugin_crt0.c | |||
@@ -141,6 +141,7 @@ void exit_on_usb(int button) | |||
141 | long result = rb->default_event_handler_ex(button, cleanup_wrapper, NULL); | 141 | long result = rb->default_event_handler_ex(button, cleanup_wrapper, NULL); |
142 | if (result == SYS_USB_CONNECTED) | 142 | if (result == SYS_USB_CONNECTED) |
143 | _exit(PLUGIN_USB_CONNECTED); | 143 | _exit(PLUGIN_USB_CONNECTED); |
144 | else if (result == SYS_POWEROFF) | 144 | else if (result == SYS_POWEROFF || result == SYS_REBOOT) |
145 | /* note: nobody actually pays attention to this exit code */ | ||
145 | _exit(PLUGIN_POWEROFF); | 146 | _exit(PLUGIN_POWEROFF); |
146 | } | 147 | } |