Merge remote-tracking branch 'ofw/dev' into mntm-dev

This commit is contained in:
Willy-JL
2024-07-15 22:18:35 +01:00
466 changed files with 3282 additions and 3168 deletions

View File

@@ -352,7 +352,7 @@ static bool storage_ext_file_open(
file->internal_error_id = f_open(file_data, drive_path, _mode);
free(drive_path);
file->error_id = storage_ext_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_ext_file_close(void* ctx, File* file) {
@@ -362,7 +362,7 @@ static bool storage_ext_file_close(void* ctx, File* file) {
file->error_id = storage_ext_parse_error(file->internal_error_id);
free(file_data);
storage_set_storage_file_data(file, NULL, storage);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static uint16_t
@@ -407,7 +407,7 @@ static bool
}
file->error_id = storage_ext_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static uint64_t storage_ext_file_tell(void* ctx, File* file) {
@@ -448,7 +448,7 @@ static bool storage_ext_file_truncate(void* ctx, File* file) {
file->internal_error_id = f_truncate(file_data);
file->error_id = storage_ext_parse_error(file->internal_error_id);
#endif
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_ext_file_sync(void* ctx, File* file) {
@@ -463,7 +463,7 @@ static bool storage_ext_file_sync(void* ctx, File* file) {
file->internal_error_id = f_sync(file_data);
file->error_id = storage_ext_parse_error(file->internal_error_id);
#endif
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static uint64_t storage_ext_file_size(void* ctx, File* file) {
@@ -497,7 +497,7 @@ static bool storage_ext_dir_open(void* ctx, File* file, const char* path) {
file->internal_error_id = f_opendir(file_data, drive_path);
free(drive_path);
file->error_id = storage_ext_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_ext_dir_close(void* ctx, File* file) {
@@ -507,7 +507,7 @@ static bool storage_ext_dir_close(void* ctx, File* file) {
file->internal_error_id = f_closedir(file_data);
file->error_id = storage_ext_parse_error(file->internal_error_id);
free(file_data);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_ext_dir_read(
@@ -538,7 +538,7 @@ static bool storage_ext_dir_read(
file->error_id = FSE_NOT_EXIST;
}
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_ext_dir_rewind(void* ctx, File* file) {
@@ -547,7 +547,7 @@ static bool storage_ext_dir_rewind(void* ctx, File* file) {
file->internal_error_id = f_readdir(file_data, NULL);
file->error_id = storage_ext_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
/******************* Common FS Functions *******************/

View File

@@ -4,7 +4,8 @@
#include <toolbox/path.h>
#define TAG "StorageInt"
#define STORAGE_PATH STORAGE_INT_PATH_PREFIX
#define STORAGE_PATH STORAGE_INT_PATH_PREFIX
#define LFS_CLEAN_FINGERPRINT 0
/* When less than LFS_RESERVED_PAGES_COUNT are left free, creation &
@@ -287,7 +288,7 @@ static bool storage_int_check_for_free_space(StorageData* storage) {
lfs_size_t free_space =
(lfs_data->config.block_count - result) * lfs_data->config.block_size;
return (free_space > LFS_RESERVED_PAGES_COUNT * furi_hal_flash_get_page_size());
return free_space > LFS_RESERVED_PAGES_COUNT * furi_hal_flash_get_page_size();
}
return false;
@@ -344,7 +345,7 @@ static bool storage_int_file_open(
file->error_id = storage_int_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_int_file_close(void* ctx, File* file) {
@@ -360,7 +361,7 @@ static bool storage_int_file_close(void* ctx, File* file) {
file->error_id = storage_int_parse_error(file->internal_error_id);
lfs_handle_free(handle);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static uint16_t
@@ -430,7 +431,7 @@ static bool
}
file->error_id = storage_int_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static uint64_t storage_int_file_tell(void* ctx, File* file) {
@@ -483,7 +484,7 @@ static bool storage_int_file_truncate(void* ctx, File* file) {
file->error_id = storage_int_parse_error(file->internal_error_id);
}
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_int_file_sync(void* ctx, File* file) {
@@ -498,7 +499,7 @@ static bool storage_int_file_sync(void* ctx, File* file) {
}
file->error_id = storage_int_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static uint64_t storage_int_file_size(void* ctx, File* file) {
@@ -565,7 +566,7 @@ static bool storage_int_dir_open(void* ctx, File* file, const char* path) {
}
file->error_id = storage_int_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_int_dir_close(void* ctx, File* file) {
@@ -581,7 +582,7 @@ static bool storage_int_dir_close(void* ctx, File* file) {
file->error_id = storage_int_parse_error(file->internal_error_id);
lfs_handle_free(handle);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_int_dir_read(
@@ -622,7 +623,7 @@ static bool storage_int_dir_read(
file->error_id = storage_int_parse_error(file->internal_error_id);
}
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
static bool storage_int_dir_rewind(void* ctx, File* file) {
@@ -637,7 +638,7 @@ static bool storage_int_dir_rewind(void* ctx, File* file) {
}
file->error_id = storage_int_parse_error(file->internal_error_id);
return (file->error_id == FSE_OK);
return file->error_id == FSE_OK;
}
/******************* Common FS Functions *******************/