[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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user