From cd311380dd5c676481c2945652eacbbe8a72e477 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Sun, 12 Jan 2025 14:52:16 +1000 Subject: [PATCH] fs: ext2: update `CONFIG_MAX_FILES` name Add the `EXT2` prefix to `config MAX_FILES` to more appropriately namespace the symbol. Signed-off-by: Jordan Yates --- doc/releases/migration-guide-4.1.rst | 6 ++++++ subsys/fs/ext2/Kconfig | 2 +- subsys/fs/ext2/ext2_ops.c | 5 +++-- subsys/fs/ext2/ext2_struct.h | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/releases/migration-guide-4.1.rst b/doc/releases/migration-guide-4.1.rst index 5395efdb1f1..047c68c4176 100644 --- a/doc/releases/migration-guide-4.1.rst +++ b/doc/releases/migration-guide-4.1.rst @@ -446,6 +446,12 @@ Other Subsystems Flash map ========= +Filesystem +========== + +* The EXT2 Kconfig symbol ``CONFIG_MAX_FILES`` has been renamed to + :kconfig:option:`CONFIG_EXT2_MAX_FILES`. + hawkBit ======= diff --git a/subsys/fs/ext2/Kconfig b/subsys/fs/ext2/Kconfig index 9633a595b61..a4f3f919a10 100644 --- a/subsys/fs/ext2/Kconfig +++ b/subsys/fs/ext2/Kconfig @@ -18,7 +18,7 @@ if FILE_SYSTEM_EXT2 menu "Ext2 file system Settings" visible if FILE_SYSTEM_EXT2 -config MAX_FILES +config EXT2_MAX_FILES int "Maximum number of opened inodes" default 10 diff --git a/subsys/fs/ext2/ext2_ops.c b/subsys/fs/ext2/ext2_ops.c index 10acb8c891e..509a1c1b73d 100644 --- a/subsys/fs/ext2/ext2_ops.c +++ b/subsys/fs/ext2/ext2_ops.c @@ -18,7 +18,8 @@ LOG_MODULE_DECLARE(ext2); -K_MEM_SLAB_DEFINE(file_struct_slab, sizeof(struct ext2_file), CONFIG_MAX_FILES, sizeof(void *)); +K_MEM_SLAB_DEFINE(file_struct_slab, sizeof(struct ext2_file), CONFIG_EXT2_MAX_FILES, + sizeof(void *)); /* File operations */ @@ -28,7 +29,7 @@ static int ext2_open(struct fs_file_t *filp, const char *fs_path, fs_mode_t flag struct ext2_file *file; struct ext2_data *fs = filp->mp->fs_data; - if (fs->open_files >= CONFIG_MAX_FILES) { + if (fs->open_files >= CONFIG_EXT2_MAX_FILES) { LOG_DBG("Too many open files"); return -EMFILE; } diff --git a/subsys/fs/ext2/ext2_struct.h b/subsys/fs/ext2/ext2_struct.h index f2805752140..64c8c5a255f 100644 --- a/subsys/fs/ext2/ext2_struct.h +++ b/subsys/fs/ext2/ext2_struct.h @@ -224,7 +224,7 @@ struct ext2_backend_ops { int (*sync)(struct ext2_data *fs); }; -#define MAX_INODES (CONFIG_MAX_FILES + 2) +#define MAX_INODES (CONFIG_EXT2_MAX_FILES + 2) struct ext2_data { struct ext2_superblock sblock; /* superblock */