[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:
@@ -317,22 +317,22 @@ static void do_test_end(Storage* api, const char* path) {
|
||||
|
||||
int32_t storage_test_app(void* p) {
|
||||
UNUSED(p);
|
||||
Storage* api = furi_record_open("storage");
|
||||
do_test_start(api, "/int");
|
||||
do_test_start(api, "/any");
|
||||
do_test_start(api, "/ext");
|
||||
Storage* api = furi_record_open(RECORD_STORAGE);
|
||||
do_test_start(api, STORAGE_INT_PATH_PREFIX);
|
||||
do_test_start(api, STORAGE_ANY_PATH_PREFIX);
|
||||
do_test_start(api, STORAGE_EXT_PATH_PREFIX);
|
||||
|
||||
do_file_test(api, "/int/test.txt");
|
||||
do_file_test(api, "/any/test.txt");
|
||||
do_file_test(api, "/ext/test.txt");
|
||||
do_file_test(api, INT_PATH("test.txt"));
|
||||
do_file_test(api, ANY_PATH("test.txt"));
|
||||
do_file_test(api, EXT_PATH("test.txt"));
|
||||
|
||||
do_dir_test(api, "/int");
|
||||
do_dir_test(api, "/any");
|
||||
do_dir_test(api, "/ext");
|
||||
do_dir_test(api, STORAGE_INT_PATH_PREFIX);
|
||||
do_dir_test(api, STORAGE_ANY_PATH_PREFIX);
|
||||
do_dir_test(api, STORAGE_EXT_PATH_PREFIX);
|
||||
|
||||
do_test_end(api, "/int");
|
||||
do_test_end(api, "/any");
|
||||
do_test_end(api, "/ext");
|
||||
do_test_end(api, STORAGE_INT_PATH_PREFIX);
|
||||
do_test_end(api, STORAGE_ANY_PATH_PREFIX);
|
||||
do_test_end(api, STORAGE_EXT_PATH_PREFIX);
|
||||
|
||||
while(true) {
|
||||
furi_delay_ms(1000);
|
||||
|
||||
Reference in New Issue
Block a user