[FL-2675] /int space reservation (#1448)
* storage: added global #defines for /int, /ext & /any * storage: introduced PATH_EXT, PATH_INT& PATH_ANY macros * core apps: moved hardcoded config files names to separate headers; prefixed them with "."; updater: added file name migration to new naming convention on backup extraction * storage: fixed storage_merge_recursive handling of complex directory structures; storage_move_to_sd: changed data migration logic to all non-dot files & all folders * core: added macro aliases for core record names * Bumped protobuf commit pointer * storage: reserved 5 pages in /int; denying write&creation of non-dot files when running out of free space Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -44,9 +44,9 @@ static const uint8_t desktop_helpers_fails_timeout[] = {
|
||||
};
|
||||
|
||||
void desktop_pin_lock_error_notify() {
|
||||
NotificationApp* notification = furi_record_open("notification");
|
||||
NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
|
||||
notification_message(notification, &sequence_pin_fail);
|
||||
furi_record_close("notification");
|
||||
furi_record_close(RECORD_NOTIFICATION);
|
||||
}
|
||||
|
||||
uint32_t desktop_pin_lock_get_fail_timeout() {
|
||||
@@ -67,9 +67,9 @@ void desktop_pin_lock(DesktopSettings* settings) {
|
||||
|
||||
furi_hal_rtc_set_pin_fails(0);
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagLock);
|
||||
Cli* cli = furi_record_open("cli");
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_session_close(cli);
|
||||
furi_record_close("cli");
|
||||
furi_record_close(RECORD_CLI);
|
||||
settings->is_locked = 1;
|
||||
SAVE_DESKTOP_SETTINGS(settings);
|
||||
}
|
||||
@@ -78,9 +78,9 @@ void desktop_pin_unlock(DesktopSettings* settings) {
|
||||
furi_assert(settings);
|
||||
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
|
||||
Cli* cli = furi_record_open("cli");
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_session_open(cli, &cli_vcp);
|
||||
furi_record_close("cli");
|
||||
furi_record_close(RECORD_CLI);
|
||||
settings->is_locked = 0;
|
||||
SAVE_DESKTOP_SETTINGS(settings);
|
||||
}
|
||||
@@ -103,9 +103,9 @@ void desktop_pin_lock_init(DesktopSettings* settings) {
|
||||
}
|
||||
|
||||
if(desktop_pin_lock_is_locked()) {
|
||||
Cli* cli = furi_record_open("cli");
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_session_close(cli);
|
||||
furi_record_close("cli");
|
||||
furi_record_close(RECORD_CLI);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ void slideshow_free(Slideshow* slideshow) {
|
||||
}
|
||||
|
||||
bool slideshow_load(Slideshow* slideshow, const char* fspath) {
|
||||
Storage* storage = furi_record_open("storage");
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
File* slideshow_file = storage_file_alloc(storage);
|
||||
slideshow->loaded = false;
|
||||
do {
|
||||
@@ -86,7 +86,7 @@ bool slideshow_load(Slideshow* slideshow, const char* fspath) {
|
||||
}
|
||||
} while(false);
|
||||
storage_file_free(slideshow_file);
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
return slideshow->loaded;
|
||||
}
|
||||
|
||||
|
3
applications/desktop/helpers/slideshow_filename.h
Normal file
3
applications/desktop/helpers/slideshow_filename.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define SLIDESHOW_FILE_NAME ".slideshow"
|
Reference in New Issue
Block a user