You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ji...@apache.org on 2026/02/02 03:01:25 UTC
(nuttx-apps) branch master updated (2908f1015 -> eda130974)
This is an automated email from the ASF dual-hosted git repository.
jiuzhudong pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
from 2908f1015 apps/system/ymodem: Optimized ymodem for burn during bootloader
new 102c07883 mtd/nvs: modify config name to MTD_CONFIG_NVS part1
new d9d434d97 mtdconfig: lomtdconfig device change to depends on !MTD_CONFIG_NONE
new eda130974 mtdconfig: modify config names for mtdconfig testcases 2
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
nshlib/nsh_command.c | 2 +-
nshlib/nsh_fscmds.c | 8 +--
system/cfgdata/Kconfig | 2 +-
testing/fs/mtd_config_fs/CMakeLists.txt | 10 ++--
testing/fs/mtd_config_fs/Kconfig | 22 ++++----
testing/fs/mtd_config_fs/Make.defs | 2 +-
testing/fs/mtd_config_fs/Makefile | 8 +--
testing/fs/mtd_config_fs/mtd_config_fs_test_main.c | 66 +++++++++++-----------
8 files changed, 60 insertions(+), 60 deletions(-)
(nuttx-apps) 03/03: mtdconfig: modify config names for mtdconfig testcases 2
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiuzhudong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit eda1309745e4d3b7ee7bec107ebc93e52225b2eb
Author: zhaoxingyu1 <zh...@xiaomi.com>
AuthorDate: Wed Jan 28 15:56:30 2026 +0800
mtdconfig: modify config names for mtdconfig testcases 2
change nvs module testcase name TESTING_MTD_CONFIG_FAIL_SAFE
to TESTING_MTD_CONFIG_NVS and modify the configuration names
related to mtdconfig testing.
Signed-off-by: zhaoxingyu1 <zh...@xiaomi.com>
---
testing/fs/mtd_config_fs/CMakeLists.txt | 10 ++--
testing/fs/mtd_config_fs/Kconfig | 20 +++----
testing/fs/mtd_config_fs/Make.defs | 2 +-
testing/fs/mtd_config_fs/Makefile | 8 +--
testing/fs/mtd_config_fs/mtd_config_fs_test_main.c | 66 +++++++++++-----------
5 files changed, 53 insertions(+), 53 deletions(-)
diff --git a/testing/fs/mtd_config_fs/CMakeLists.txt b/testing/fs/mtd_config_fs/CMakeLists.txt
index 70201dca9..32651349b 100644
--- a/testing/fs/mtd_config_fs/CMakeLists.txt
+++ b/testing/fs/mtd_config_fs/CMakeLists.txt
@@ -20,16 +20,16 @@
#
# ##############################################################################
-if(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE)
+if(CONFIG_TESTING_MTD_CONFIG_NVS)
nuttx_add_application(
NAME
- ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME}
+ ${CONFIG_TESTING_MTD_CONFIG_PROGNAME}
PRIORITY
- ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY}
+ ${CONFIG_TESTING_MTD_CONFIG_PRIORITY}
STACKSIZE
- ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE}
+ ${CONFIG_TESTING_MTD_CONFIG_STACKSIZE}
MODULE
- ${CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE}
+ ${CONFIG_TESTING_MTD_CONFIG_NVS}
SRCS
mtd_config_fs_test_main.c)
endif()
diff --git a/testing/fs/mtd_config_fs/Kconfig b/testing/fs/mtd_config_fs/Kconfig
index d2c9c2e8c..0ca8d6d47 100644
--- a/testing/fs/mtd_config_fs/Kconfig
+++ b/testing/fs/mtd_config_fs/Kconfig
@@ -3,7 +3,7 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
-config TESTING_MTD_CONFIG_FAIL_SAFE
+config TESTING_MTD_CONFIG_NVS
tristate "MTD Config fail-safe storage test"
default n
depends on MTD_CONFIG_NVS
@@ -11,40 +11,40 @@ config TESTING_MTD_CONFIG_FAIL_SAFE
---help---
Enable the fail-safe storage test
-if TESTING_MTD_CONFIG_FAIL_SAFE
+if TESTING_MTD_CONFIG_NVS
-config TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME
+config TESTING_MTD_CONFIG_PROGNAME
string "Program name"
default "mtdconfig_fs_test"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.
-config TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME
+config TESTING_MTD_CONFIG_MOUNTPT_NAME
string "MTD driver mount pt"
default "/dev/mtdnvs_flash"
-config TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_MAXNAME
+config TESTING_MTD_CONFIG_MOUNTPT_MAXNAME
int "MTD driver mount pt path len"
default 64
-config TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+config TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
int "MTD flash section size"
default 4096
-config TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_COUNT
+config TESTING_MTD_CONFIG_FLASH_SECTION_COUNT
int "MTD flash section count"
default 3
-config TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY
+config TESTING_MTD_CONFIG_PRIORITY
int "MTD nvs test task priority"
default 100
-config TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE
+config TESTING_MTD_CONFIG_STACKSIZE
int "MTD nvs test stack size"
default 4096
-config TESTING_MTD_CONFIG_FAIL_SAFE_VERBOSE
+config TESTING_MTD_CONFIG_VERBOSE
bool "Verbose output"
default n
diff --git a/testing/fs/mtd_config_fs/Make.defs b/testing/fs/mtd_config_fs/Make.defs
index 0c8bde14c..72fbf13e5 100644
--- a/testing/fs/mtd_config_fs/Make.defs
+++ b/testing/fs/mtd_config_fs/Make.defs
@@ -20,6 +20,6 @@
#
############################################################################
-ifneq ($(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE),)
+ifneq ($(CONFIG_TESTING_MTD_CONFIG_NVS),)
CONFIGURED_APPS += $(APPDIR)/testing/fs/mtd_config_fs
endif
diff --git a/testing/fs/mtd_config_fs/Makefile b/testing/fs/mtd_config_fs/Makefile
index c3ad88386..359b210e6 100644
--- a/testing/fs/mtd_config_fs/Makefile
+++ b/testing/fs/mtd_config_fs/Makefile
@@ -24,10 +24,10 @@ include $(APPDIR)/Make.defs
# MTD nvs test application info
-PROGNAME = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PROGNAME)
-PRIORITY = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_PRIORITY)
-STACKSIZE = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_STACKSIZE)
-MODULE = $(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE)
+PROGNAME = $(CONFIG_TESTING_MTD_CONFIG_PROGNAME)
+PRIORITY = $(CONFIG_TESTING_MTD_CONFIG_PRIORITY)
+STACKSIZE = $(CONFIG_TESTING_MTD_CONFIG_STACKSIZE)
+MODULE = $(CONFIG_TESTING_MTD_CONFIG_NVS)
# MTD nvs test
diff --git a/testing/fs/mtd_config_fs/mtd_config_fs_test_main.c b/testing/fs/mtd_config_fs/mtd_config_fs_test_main.c
index 16ed4cb7e..c85df92aa 100644
--- a/testing/fs/mtd_config_fs/mtd_config_fs_test_main.c
+++ b/testing/fs/mtd_config_fs/mtd_config_fs_test_main.c
@@ -81,7 +81,7 @@ begin_packed_struct struct nvs_ate
struct mtdnvs_ctx_s
{
- char mountdir[CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_MAXNAME];
+ char mountdir[CONFIG_TESTING_MTD_CONFIG_MOUNTPT_MAXNAME];
struct mallinfo mmbefore;
struct mallinfo mmprevious;
struct mallinfo mmafter;
@@ -351,7 +351,7 @@ static void show_useage(void)
printf("Usage : mtdconfig_fs_test [OPTION [ARG]] ...\n");
printf("-h show this help statement\n");
printf("-m mount point to be tested e.g. [%s]\n",
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME);
+ CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME);
}
/****************************************************************************
@@ -402,12 +402,12 @@ static int setup(struct mtdnvs_ctx_s *ctx)
int ret;
FAR struct inode *sys_node;
- ret = find_mtddriver(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME,
+ ret = find_mtddriver(CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME,
&sys_node);
if (ret < 0)
{
printf("ERROR: open %s failed: %d\n",
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME, ret);
+ CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME, ret);
return -errno;
}
@@ -608,7 +608,7 @@ static void test_nvs_corrupt_expire(struct mtdnvs_ctx_s *ctx)
printf("%s: test begin\n", __func__);
- mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME, O_RDWR);
+ mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME, O_RDWR);
if (mtd_fd < 0)
{
printf("%s:mtdnvs_register failed, ret=%d\n", __func__, mtd_fd);
@@ -662,7 +662,7 @@ static void test_nvs_corrupt_expire(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff */
for (i = 2 * (strlen(TEST_KEY1) + strlen(TEST_DATA1) + 2) + padding_size;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 4 * ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -699,7 +699,7 @@ static void test_nvs_corrupt_expire(struct mtdnvs_ctx_s *ctx)
/* write close ate, mark section 0 as closed */
ret = write_close_ate(mtd_fd, ctx,
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 4 * ate_size);
if (ret < 0)
{
@@ -798,7 +798,7 @@ static void test_nvs_corrupted_write(struct mtdnvs_ctx_s *ctx)
printf("%s: test begin\n", __func__);
- mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME, O_RDWR);
+ mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME, O_RDWR);
if (mtd_fd < 0)
{
printf("%s:mtdnvs_register failed, ret=%d\n", __func__, mtd_fd);
@@ -854,7 +854,7 @@ static void test_nvs_corrupted_write(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff */
for (i = 2 * (sizeof(key1) + sizeof(wr_buf_1)) + padding_size;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 3 * nvs_ate_size(ctx); i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -966,7 +966,7 @@ static void test_nvs_gc(struct mtdnvs_ctx_s *ctx)
size_t kv_size = nvs_align_up(ctx, 44 + 4) + ate_size;
size_t block_max_write_size =
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE - ate_size;
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE - ate_size;
uint16_t block_max_write_nums = block_max_write_size / kv_size;
const uint16_t max_writes = block_max_write_nums + 1;
@@ -1235,9 +1235,9 @@ static void test_nvs_gc_3sectors(struct mtdnvs_ctx_s *ctx)
size_t kv_size = nvs_align_up(ctx, 44 + 4) + ate_size;
uint16_t max_id =
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE / kv_size;
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE / kv_size;
const uint16_t max_writes =
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE * 2 / kv_size + 1;
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE * 2 / kv_size + 1;
const uint16_t max_writes_2 = max_writes + max_id;
const uint16_t max_writes_3 = max_writes_2 + max_id;
const uint16_t max_writes_4 = max_writes_3 + max_id;
@@ -1435,7 +1435,7 @@ static void test_nvs_corrupted_sector_close(struct mtdnvs_ctx_s *ctx)
printf("%s: test begin\n", __func__);
- mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME, O_RDWR);
+ mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME, O_RDWR);
if (mtd_fd < 0)
{
printf("%s:mtdnvs_register failed, ret=%d\n", __func__, mtd_fd);
@@ -1446,7 +1446,7 @@ static void test_nvs_corrupted_sector_close(struct mtdnvs_ctx_s *ctx)
for (loop_section = 0;
loop_section <
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_COUNT - 1;
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_COUNT - 1;
loop_section++)
{
/* write valid data */
@@ -1474,7 +1474,7 @@ static void test_nvs_corrupted_sector_close(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff */
for (i = 2 * (sizeof(key1) + sizeof(wr_buf));
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 4 * ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -1490,7 +1490,7 @@ static void test_nvs_corrupted_sector_close(struct mtdnvs_ctx_s *ctx)
ret = write_ate(mtd_fd, ctx, key1, sizeof(wr_buf),
sizeof(wr_buf) + sizeof(key1),
(loop_section ==
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_COUNT - 2)
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_COUNT - 2)
? false : true);
if (ret < 0)
{
@@ -1512,14 +1512,14 @@ static void test_nvs_corrupted_sector_close(struct mtdnvs_ctx_s *ctx)
}
if (loop_section ==
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_COUNT - 2)
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_COUNT - 2)
{
ret = write_corrupted_close_ate(mtd_fd, ctx);
}
else
{
ret = write_close_ate(mtd_fd, ctx,
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 4 * ate_size);
}
@@ -1787,7 +1787,7 @@ static void test_nvs_gc_corrupt_close_ate(struct mtdnvs_ctx_s *ctx)
printf("%s: test begin\n", __func__);
- mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME, O_RDWR);
+ mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME, O_RDWR);
if (mtd_fd < 0)
{
printf("%s:mtdnvs_register failed, ret=%d\n", __func__, mtd_fd);
@@ -1813,7 +1813,7 @@ static void test_nvs_gc_corrupt_close_ate(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff */
for (i = strlen(TEST_KEY1) + strlen(TEST_DATA1) + 2;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 6 * ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -1834,9 +1834,9 @@ static void test_nvs_gc_corrupt_close_ate(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff */
- for (i = CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ for (i = CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 5 * ate_size;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 2 * ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -1865,8 +1865,8 @@ static void test_nvs_gc_corrupt_close_ate(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff in section 1 */
- for (i = CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ for (i = CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE;
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -1964,7 +1964,7 @@ static void test_nvs_gc_corrupt_ate(struct mtdnvs_ctx_s *ctx)
printf("%s: test begin\n", __func__);
- mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME, O_RDWR);
+ mtd_fd = open(CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME, O_RDWR);
if (mtd_fd < 0)
{
printf("%s:mtdnvs_register failed, ret=%d\n", __func__, mtd_fd);
@@ -1974,7 +1974,7 @@ static void test_nvs_gc_corrupt_ate(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff */
for (i = 0 ;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE / 2; i++)
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE / 2; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
if (ret != sizeof(erase_value))
@@ -1992,9 +1992,9 @@ static void test_nvs_gc_corrupt_ate(struct mtdnvs_ctx_s *ctx)
goto test_fail;
}
- for (i = CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE / 2
+ for (i = CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE / 2
+ ate_size;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- 2 * ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -2016,7 +2016,7 @@ static void test_nvs_gc_corrupt_ate(struct mtdnvs_ctx_s *ctx)
/* write close ate, mark section 0 as closed */
ret = write_close_ate(mtd_fd, ctx,
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE / 2);
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE / 2);
if (ret < 0)
{
printf("%s:write gc_done ate failed, ret=%d\n", __func__, ret);
@@ -2025,8 +2025,8 @@ static void test_nvs_gc_corrupt_ate(struct mtdnvs_ctx_s *ctx)
/* set unused flash to 0xff in section 1 */
- for (i = CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE;
- i < CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE
+ for (i = CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE;
+ i < CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE
- ate_size; i++)
{
ret = write(mtd_fd, &erase_value, sizeof(erase_value));
@@ -2040,7 +2040,7 @@ static void test_nvs_gc_corrupt_ate(struct mtdnvs_ctx_s *ctx)
/* write close ate, mark section 1 as closed */
ret = write_close_ate(mtd_fd, ctx,
- CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_FLASH_SECTION_SIZE / 2);
+ CONFIG_TESTING_MTD_CONFIG_FLASH_SECTION_SIZE / 2);
if (ret < 0)
{
printf("%s:write gc_done ate failed, ret=%d\n", __func__, ret);
@@ -2582,7 +2582,7 @@ int main(int argc, FAR char *argv[])
memset(ctx, 0, sizeof(struct mtdnvs_ctx_s));
- strlcpy(ctx->mountdir, CONFIG_TESTING_MTD_CONFIG_FAIL_SAFE_MOUNTPT_NAME,
+ strlcpy(ctx->mountdir, CONFIG_TESTING_MTD_CONFIG_MOUNTPT_NAME,
sizeof(ctx->mountdir));
/* Opt Parse */
(nuttx-apps) 01/03: mtd/nvs: modify config name to MTD_CONFIG_NVS part1
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiuzhudong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 102c0788341f1c73d298a3acab9a81dc03a63b22
Author: zhaoxingyu1 <zh...@xiaomi.com>
AuthorDate: Wed Jun 4 14:53:31 2025 +0800
mtd/nvs: modify config name to MTD_CONFIG_NVS part1
Because the MTD_CONFIG configuration item in
drivers/mtd/Kconfig has changed
Signed-off-by: zhaoxingyu1 <zh...@xiaomi.com>
---
system/cfgdata/Kconfig | 2 +-
testing/fs/mtd_config_fs/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/system/cfgdata/Kconfig b/system/cfgdata/Kconfig
index 23eb9ebce..64f51d40e 100644
--- a/system/cfgdata/Kconfig
+++ b/system/cfgdata/Kconfig
@@ -6,7 +6,7 @@
config SYSTEM_CFGDATA
tristate "Cfgdata Command"
default n
- depends on MTD_CONFIG
+ depends on !MTD_CONFIG_NONE
---help---
Enable support for the CFGDATA tool.
diff --git a/testing/fs/mtd_config_fs/Kconfig b/testing/fs/mtd_config_fs/Kconfig
index 02f8b752a..d2c9c2e8c 100644
--- a/testing/fs/mtd_config_fs/Kconfig
+++ b/testing/fs/mtd_config_fs/Kconfig
@@ -6,7 +6,7 @@
config TESTING_MTD_CONFIG_FAIL_SAFE
tristate "MTD Config fail-safe storage test"
default n
- depends on MTD_CONFIG_FAIL_SAFE
+ depends on MTD_CONFIG_NVS
select MTD_CONFIG_NAMED
---help---
Enable the fail-safe storage test
(nuttx-apps) 02/03: mtdconfig: lomtdconfig device change to depends on !MTD_CONFIG_NONE
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jiuzhudong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit d9d434d97eded8b303d20d48d46adf7b22205e3f
Author: zhaoxingyu1 <zh...@xiaomi.com>
AuthorDate: Tue Jun 3 17:33:16 2025 +0800
mtdconfig: lomtdconfig device change to depends on !MTD_CONFIG_NONE
Because MTD_CONFIG configuration item in drivers/mtd/Kconfig
has changed.
Signed-off-by: zhaoxingyu1 <zh...@xiaomi.com>
---
nshlib/nsh_command.c | 2 +-
nshlib/nsh_fscmds.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c
index cace8eeac..ec3f8a385 100644
--- a/nshlib/nsh_command.c
+++ b/nshlib/nsh_command.c
@@ -322,7 +322,7 @@ static const struct cmdmap_s g_cmdmap[] =
#ifndef CONFIG_DISABLE_MOUNTPOINT
# if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD)
-# ifdef CONFIG_MTD_CONFIG
+# ifndef CONFIG_MTD_CONFIG_NONE
CMD_MAP("lomtd", cmd_lomtd, 3, 10,
"[-d <dev-path>] | [[-o <offset>] [-e <erase-size>] "
"[-b <sect-size>] [-c <configdata>] <dev-path> <file-path>]]"),
diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c
index 447d45e72..13f26f694 100644
--- a/nshlib/nsh_fscmds.c
+++ b/nshlib/nsh_fscmds.c
@@ -1308,7 +1308,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
int sectsize = -1;
off_t offset = 0;
bool badarg = false;
-# ifdef CONFIG_MTD_CONFIG
+# ifndef CONFIG_MTD_CONFIG_NONE
int configdata = 0;
# endif
int ret = ERROR;
@@ -1324,7 +1324,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
* NOTE that the -o and -r options are accepted with the -d option, but
* will be ignored.
*/
-# ifdef CONFIG_MTD_CONFIG
+# ifndef CONFIG_MTD_CONFIG_NONE
while ((option = getopt(argc, argv, "d:o:e:b:c:")) != ERROR)
# else
while ((option = getopt(argc, argv, "d:o:e:b:")) != ERROR)
@@ -1349,7 +1349,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
sectsize = atoi(optarg);
break;
-# ifdef CONFIG_MTD_CONFIG
+# ifndef CONFIG_MTD_CONFIG_NONE
case 'c':
configdata = atoi(optarg);
break;
@@ -1435,7 +1435,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
setup.sectsize = sectsize; /* The sector size to use with the block device */
setup.erasesize = erasesize; /* The sector size to use with the block device */
setup.offset = offset; /* An offset that may be applied to the device */
-# ifdef CONFIG_MTD_CONFIG
+# ifndef CONFIG_MTD_CONFIG_NONE
setup.configdata = configdata; /* Is a loop mtdconfig device */
# endif