[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:
@@ -163,11 +163,11 @@ iButton* ibutton_alloc() {
|
||||
view_dispatcher_set_tick_event_callback(
|
||||
ibutton->view_dispatcher, ibutton_tick_event_callback, 100);
|
||||
|
||||
ibutton->gui = furi_record_open("gui");
|
||||
ibutton->gui = furi_record_open(RECORD_GUI);
|
||||
|
||||
ibutton->storage = furi_record_open("storage");
|
||||
ibutton->dialogs = furi_record_open("dialogs");
|
||||
ibutton->notifications = furi_record_open("notification");
|
||||
ibutton->storage = furi_record_open(RECORD_STORAGE);
|
||||
ibutton->dialogs = furi_record_open(RECORD_DIALOGS);
|
||||
ibutton->notifications = furi_record_open(RECORD_NOTIFICATION);
|
||||
|
||||
ibutton->key = ibutton_key_alloc();
|
||||
ibutton->key_worker = ibutton_worker_alloc();
|
||||
@@ -224,16 +224,16 @@ void ibutton_free(iButton* ibutton) {
|
||||
view_dispatcher_free(ibutton->view_dispatcher);
|
||||
scene_manager_free(ibutton->scene_manager);
|
||||
|
||||
furi_record_close("storage");
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
ibutton->storage = NULL;
|
||||
|
||||
furi_record_close("notification");
|
||||
furi_record_close(RECORD_NOTIFICATION);
|
||||
ibutton->notifications = NULL;
|
||||
|
||||
furi_record_close("dialogs");
|
||||
furi_record_close(RECORD_DIALOGS);
|
||||
ibutton->dialogs = NULL;
|
||||
|
||||
furi_record_close("gui");
|
||||
furi_record_close(RECORD_GUI);
|
||||
ibutton->gui = NULL;
|
||||
|
||||
ibutton_worker_stop_thread(ibutton->key_worker);
|
||||
|
@@ -12,10 +12,10 @@ static void onewire_cli(Cli* cli, string_t args, void* context);
|
||||
// app cli function
|
||||
void ibutton_on_system_start() {
|
||||
#ifdef SRV_CLI
|
||||
Cli* cli = furi_record_open("cli");
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "ikey", CliCommandFlagDefault, ibutton_cli, cli);
|
||||
cli_add_command(cli, "onewire", CliCommandFlagDefault, onewire_cli, cli);
|
||||
furi_record_close("cli");
|
||||
furi_record_close(RECORD_CLI);
|
||||
#else
|
||||
UNUSED(ibutton_cli);
|
||||
UNUSED(onewire_cli);
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#define IBUTTON_FILE_NAME_SIZE 100
|
||||
#define IBUTTON_TEXT_STORE_SIZE 128
|
||||
|
||||
#define IBUTTON_APP_FOLDER "/any/ibutton"
|
||||
#define IBUTTON_APP_FOLDER ANY_PATH("ibutton")
|
||||
#define IBUTTON_APP_EXTENSION ".ibtn"
|
||||
#define IBUTTON_APP_FILE_TYPE "Flipper iButton key"
|
||||
|
||||
|
Reference in New Issue
Block a user