Skip to content

Commit cd31138

Browse files
JordanYateskartben
authored andcommitted
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 <[email protected]>
1 parent f2f62b0 commit cd31138

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

doc/releases/migration-guide-4.1.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,12 @@ Other Subsystems
446446
Flash map
447447
=========
448448

449+
Filesystem
450+
==========
451+
452+
* The EXT2 Kconfig symbol ``CONFIG_MAX_FILES`` has been renamed to
453+
:kconfig:option:`CONFIG_EXT2_MAX_FILES`.
454+
449455
hawkBit
450456
=======
451457

subsys/fs/ext2/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if FILE_SYSTEM_EXT2
1818
menu "Ext2 file system Settings"
1919
visible if FILE_SYSTEM_EXT2
2020

21-
config MAX_FILES
21+
config EXT2_MAX_FILES
2222
int "Maximum number of opened inodes"
2323
default 10
2424

subsys/fs/ext2/ext2_ops.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
LOG_MODULE_DECLARE(ext2);
2020

21-
K_MEM_SLAB_DEFINE(file_struct_slab, sizeof(struct ext2_file), CONFIG_MAX_FILES, sizeof(void *));
21+
K_MEM_SLAB_DEFINE(file_struct_slab, sizeof(struct ext2_file), CONFIG_EXT2_MAX_FILES,
22+
sizeof(void *));
2223

2324
/* File operations */
2425

@@ -28,7 +29,7 @@ static int ext2_open(struct fs_file_t *filp, const char *fs_path, fs_mode_t flag
2829
struct ext2_file *file;
2930
struct ext2_data *fs = filp->mp->fs_data;
3031

31-
if (fs->open_files >= CONFIG_MAX_FILES) {
32+
if (fs->open_files >= CONFIG_EXT2_MAX_FILES) {
3233
LOG_DBG("Too many open files");
3334
return -EMFILE;
3435
}

subsys/fs/ext2/ext2_struct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ struct ext2_backend_ops {
224224
int (*sync)(struct ext2_data *fs);
225225
};
226226

227-
#define MAX_INODES (CONFIG_MAX_FILES + 2)
227+
#define MAX_INODES (CONFIG_EXT2_MAX_FILES + 2)
228228

229229
struct ext2_data {
230230
struct ext2_superblock sblock; /* superblock */

0 commit comments

Comments
 (0)