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 <[email protected]> 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 <[email protected]> --- 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
