Updater: handle storage errors when removing files, fix folder remove routine, prevent unused services from starting (#2432)

* Updater: handle storage errors when removing files
* Updater: properly handle folder removal in post update cleanup stage. Prevent power, desktop and dolphin services from starting on update.
* Desktop, Dolphin, Power: proper handling and message for special boot mode.
* Desktop, Power: add missing TAG
* Updater: unify start skip message and fix double delete in backup worker
* Cli: unify special boot mode message
This commit is contained in:
あく
2023-02-27 00:15:26 +09:00
committed by GitHub
parent 0c06e54831
commit 3efb7d4050
8 changed files with 46 additions and 23 deletions

View File

@@ -373,7 +373,7 @@ int32_t bt_srv(void* p) {
Bt* bt = bt_alloc();
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipped BT init: device in special startup mode");
FURI_LOG_W(TAG, "Skipping start in special boot mode");
ble_glue_wait_for_c2_start(FURI_HAL_BT_C2_START_TIMEOUT);
furi_record_create(RECORD_BT, bt);
return 0;

View File

@@ -461,7 +461,7 @@ int32_t cli_srv(void* p) {
if(furi_hal_rtc_get_boot_mode() == FuriHalRtcBootModeNormal) {
cli_session_open(cli, &cli_vcp);
} else {
FURI_LOG_W(TAG, "Skipped CLI session open: device in special startup mode");
FURI_LOG_W(TAG, "Skipping start in special boot mode");
}
while(1) {

View File

@@ -17,6 +17,8 @@
#include "helpers/pin_lock.h"
#include "helpers/slideshow_filename.h"
#define TAG "Desktop"
static void desktop_auto_lock_arm(Desktop*);
static void desktop_auto_lock_inhibit(Desktop*);
static void desktop_start_auto_lock_timer(Desktop*);
@@ -321,6 +323,12 @@ static bool desktop_check_file_flag(const char* flag_path) {
int32_t desktop_srv(void* p) {
UNUSED(p);
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
return 0;
}
Desktop* desktop = desktop_alloc();
bool loaded = DESKTOP_SETTINGS_LOAD(&desktop->settings);

View File

@@ -154,6 +154,12 @@ static void dolphin_update_clear_limits_timer_period(Dolphin* dolphin) {
int32_t dolphin_srv(void* p) {
UNUSED(p);
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
return 0;
}
Dolphin* dolphin = dolphin_alloc();
furi_record_create(RECORD_DOLPHIN, dolphin);

View File

@@ -4,6 +4,7 @@
#include <furi_hal.h>
#define POWER_OFF_TIMEOUT 90
#define TAG "Power"
void power_draw_battery_callback(Canvas* canvas, void* context) {
furi_assert(context);
@@ -217,6 +218,12 @@ static void power_check_battery_level_change(Power* power) {
int32_t power_srv(void* p) {
UNUSED(p);
if(furi_hal_rtc_get_boot_mode() != FuriHalRtcBootModeNormal) {
FURI_LOG_W(TAG, "Skipping start in special boot mode");
return 0;
}
Power* power = power_alloc();
power_update_info(power);
furi_record_create(RECORD_POWER, power);