fs/littlefs: Log error code on failed flash_area_open
Log error code to make it easier to investigate problems. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
490da9ec96
commit
ac5cdcdb8a
1 changed files with 1 additions and 1 deletions
|
|
@ -657,7 +657,7 @@ static int littlefs_flash_init(struct fs_littlefs *fs, void *dev_id)
|
||||||
/* Open flash area */
|
/* Open flash area */
|
||||||
ret = flash_area_open(area_id, fap);
|
ret = flash_area_open(area_id, fap);
|
||||||
if ((ret < 0) || (*fap == NULL)) {
|
if ((ret < 0) || (*fap == NULL)) {
|
||||||
LOG_ERR("can't open flash area %d", area_id);
|
LOG_ERR("can't open flash area %d, err %d", area_id, ret);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue