Skip to content

Commit

Permalink
subsys: settings: Fix file exist error.
Browse files Browse the repository at this point in the history
Fix file exist error within settings_subsys_init in order to correctly
reload existing settings when CONFIG_SETTINGS_FS is enabled.

Signed-off-by: Daniele Biagetti <daniele.biagetti@cblelectronics.com>
  • Loading branch information
bixivsd authored and nashif committed Jun 6, 2018
1 parent 1218648 commit bfdb6ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions subsys/settings/src/settings_init.c
Expand Up @@ -115,6 +115,12 @@ int settings_subsys_init(void)
* Must be called after root FS has been initialized.
*/
err = fs_mkdir(CONFIG_SETTINGS_FS_DIR);
/*
* The following lines mask the file exist error.
*/
if (err == -EEXIST) {
err = 0;
}
#elif defined(CONFIG_SETTINGS_FCB)
settings_init_fcb(); /* func rises kernel panic once error */
err = 0;
Expand Down

0 comments on commit bfdb6ac

Please sign in to comment.