Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update fal #7891

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions components/fal/src/fal_partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ int fal_partition_init(void)
*/
const struct fal_partition *fal_partition_find(const char *name)
{
assert(init_ok);
if (!init_ok)
return NULL;

size_t i;

Expand Down Expand Up @@ -353,9 +354,11 @@ static const struct fal_flash_dev *flash_device_find_by_part(const struct fal_pa
*/
const struct fal_partition *fal_get_partition_table(size_t *len)
{
assert(init_ok);
assert(len);

if (!init_ok)
return NULL;

*len = partition_table_len;

return partition_table;
Expand All @@ -370,9 +373,14 @@ const struct fal_partition *fal_get_partition_table(size_t *len)
*/
void fal_set_partition_table_temp(struct fal_partition *table, size_t len)
{
assert(init_ok);
assert(table);

if (!init_ok)
{
log_e("FAL NOT initialized");
return;
}

check_and_update_part_cache(table, len);

partition_table_len = len;
Expand Down Expand Up @@ -400,7 +408,7 @@ int fal_partition_read(const struct fal_partition *part, uint32_t addr, uint8_t

if (addr + size > part->len)
{
log_e("Partition read error! Partition address out of bound.");
log_e("Partition read error! Partition(%s) address(0x%08x) out of bound(0x%08x).", part->name, addr + size, part->len);
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion components/utilities/var_export/var_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int var_export_init(void)

return ve_exporter_num;
}
INIT_PREV_EXPORT(var_export_init);
INIT_BOARD_EXPORT(var_export_init);

/* initialize module */
int ve_module_init(ve_module_t *mod, const char *module)
Expand Down
Loading