Commit 8b866451 authored by Miika Karanki's avatar Miika Karanki Committed by Fabio Baltieri
Browse files

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: default avatarMiika Karanki <miika.karanki@vaisala.com>
parent 89d4f06c
Loading
Loading
Loading
Loading
+8 −0
Changes for subsys/fs/Kconfig: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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
+1 −1
Changes for subsys/fs/fat_fs.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);
+1 −1
Changes for subsys/fs/littlefs_fs.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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);