[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:
hedger
2022-07-26 15:21:51 +03:00
committed by GitHub
parent 52a83fc929
commit 056446dfed
171 changed files with 1111 additions and 910 deletions

View File

@@ -11,8 +11,7 @@
#include <toolbox/path.h>
#include <toolbox/crc32_calc.h>
#define FS_ROOT_PATH "/"
#define UPDATE_POINTER_FILE_PATH FS_ROOT_PATH UPDATE_MANIFEST_POINTER_FILE_NAME
#define UPDATE_POINTER_FILE_PATH "/" UPDATE_MANIFEST_POINTER_FILE_NAME
static FATFS* pfs = NULL;
@@ -40,7 +39,7 @@ static bool flipper_update_init() {
}
pfs = malloc(sizeof(FATFS));
CHECK_FRESULT(f_mount(pfs, FS_ROOT_PATH, 1));
CHECK_FRESULT(f_mount(pfs, "/", 1));
return true;
}
@@ -119,7 +118,7 @@ static bool flipper_update_get_manifest_path(string_t out_path) {
break;
}
string_set_str(out_path, manifest_name_buf);
string_right(out_path, strlen("/ext"));
string_right(out_path, strlen(STORAGE_EXT_PATH_PREFIX));
} while(0);
f_close(&file);
return !string_empty_p(out_path);