Commit cd311380 authored by Jordan Yates's avatar Jordan Yates Committed by Benjamin Cabé
Browse files

fs: ext2: update `CONFIG_MAX_FILES` name

Add the `EXT2` prefix to `config MAX_FILES` to more appropriately
namespace the symbol.

Signed-off-by: default avatarJordan Yates <jordan@embeint.com>
parent f2f62b0d
Loading
Loading
Loading
Loading
+6 −0
Changes for doc/releases/migration-guide-4.1.rst: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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
=======

+1 −1
Changes for subsys/fs/ext2/Kconfig: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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

+3 −2
Changes for subsys/fs/ext2/ext2_ops.c: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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;
	}
+1 −1
Changes for subsys/fs/ext2/ext2_struct.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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 */