[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

@@ -15,7 +15,7 @@
#define DATA_PICC_TO_PCD_CRC_DROPPED 0xFB
#define DATA_PCD_TO_PICC_CRC_DROPPED 0xFA
#define NFC_DEBUG_PCAP_FILENAME "/ext/nfc/debug.pcap"
#define NFC_DEBUG_PCAP_FILENAME EXT_PATH("nfc/debug.pcap")
#define NFC_DEBUG_PCAP_BUFFER_SIZE 64
struct NfcDebugPcapWorker {

View File

@@ -44,7 +44,7 @@ bool nfc_emv_parser_get_aid_name(
for(uint8_t i = 0; i < aid_len; i++) {
string_cat_printf(key, "%02X", aid[i]);
}
if(nfc_emv_parser_search_data(storage, "/ext/nfc/assets/aid.nfc", key, aid_name)) {
if(nfc_emv_parser_search_data(storage, EXT_PATH("nfc/assets/aid.nfc"), key, aid_name)) {
parsed = true;
}
string_clear(key);
@@ -58,7 +58,8 @@ bool nfc_emv_parser_get_country_name(
bool parsed = false;
string_t key;
string_init_printf(key, "%04X", country_code);
if(nfc_emv_parser_search_data(storage, "/ext/nfc/assets/country_code.nfc", key, country_name)) {
if(nfc_emv_parser_search_data(
storage, EXT_PATH("nfc/assets/country_code.nfc"), key, country_name)) {
parsed = true;
}
string_clear(key);
@@ -73,7 +74,7 @@ bool nfc_emv_parser_get_currency_name(
string_t key;
string_init_printf(key, "%04X", currency_code);
if(nfc_emv_parser_search_data(
storage, "/ext/nfc/assets/currency_code.nfc", key, currency_name)) {
storage, EXT_PATH("nfc/assets/currency_code.nfc"), key, currency_name)) {
parsed = true;
}
string_clear(key);

View File

@@ -3,7 +3,7 @@
#include <flipper_format/flipper_format.h>
#include <lib/toolbox/args.h>
#define NFC_MF_CLASSIC_DICT_PATH "/ext/nfc/assets/mf_classic_dict.nfc"
#define NFC_MF_CLASSIC_DICT_PATH EXT_PATH("nfc/assets/mf_classic_dict.nfc")
#define NFC_MF_CLASSIC_KEY_LEN (13)