fs: Add Kconfig key for init priority
Non-configurable init priority POST_KERNEL/99 might be too late for certain uses cases (e.g. fetching data from the file system in driver initialization). Chabge it to be configurable so that applications can mount the file systems earlies if they want. Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
This commit is contained in:
parent
89d4f06c17
commit
8b86645108
|
@ -43,6 +43,14 @@ config FILE_SYSTEM_MAX_FILE_NAME
|
|||
supported by a file system may result in memory access
|
||||
violations.
|
||||
|
||||
config FILE_SYSTEM_INIT_PRIORITY
|
||||
int "File system initialization priority"
|
||||
default 99
|
||||
help
|
||||
Specify the initialization priority for file systems. In case
|
||||
automount is enabled, the initialization should be done after
|
||||
the underlying storage device is initialized.
|
||||
|
||||
config FILE_SYSTEM_SHELL
|
||||
bool "File system shell"
|
||||
depends on SHELL
|
||||
|
|
|
@ -527,4 +527,4 @@ static int fatfs_init(void)
|
|||
return fs_register(FS_FATFS, &fatfs_fs);
|
||||
}
|
||||
|
||||
SYS_INIT(fatfs_init, POST_KERNEL, 99);
|
||||
SYS_INIT(fatfs_init, POST_KERNEL, CONFIG_FILE_SYSTEM_INIT_PRIORITY);
|
||||
|
|
|
@ -1098,4 +1098,4 @@ static int littlefs_init(void)
|
|||
return rc;
|
||||
}
|
||||
|
||||
SYS_INIT(littlefs_init, POST_KERNEL, 99);
|
||||
SYS_INIT(littlefs_init, POST_KERNEL, CONFIG_FILE_SYSTEM_INIT_PRIORITY);
|
||||
|
|
Loading…
Reference in a new issue