Skip to content

Commit bcf8259

Browse files
committed
mtdconfig: lomtdconfig device change to depends on !MTD_CONFIG_NONE
For the MTD_CONFIG configuration item in drivers/mtd/Kconfig has changed. Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
1 parent 50ecefc commit bcf8259

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

nshlib/nsh_command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static const struct cmdmap_s g_cmdmap[] =
322322

323323
#ifndef CONFIG_DISABLE_MOUNTPOINT
324324
# if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD)
325-
# ifdef CONFIG_MTD_CONFIG
325+
# ifndef CONFIG_MTD_CONFIG_NONE
326326
CMD_MAP("lomtd", cmd_lomtd, 3, 10,
327327
"[-d <dev-path>] | [[-o <offset>] [-e <erase-size>] "
328328
"[-b <sect-size>] [-c <configdata>] <dev-path> <file-path>]]"),

nshlib/nsh_fscmds.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
13081308
int sectsize = -1;
13091309
off_t offset = 0;
13101310
bool badarg = false;
1311-
# ifdef CONFIG_MTD_CONFIG
1311+
# ifndef CONFIG_MTD_CONFIG_NONE
13121312
int configdata = 0;
13131313
# endif
13141314
int ret = ERROR;
@@ -1324,7 +1324,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
13241324
* NOTE that the -o and -r options are accepted with the -d option, but
13251325
* will be ignored.
13261326
*/
1327-
# ifdef CONFIG_MTD_CONFIG
1327+
# ifndef CONFIG_MTD_CONFIG_NONE
13281328
while ((option = getopt(argc, argv, "d:o:e:b:c:")) != ERROR)
13291329
# else
13301330
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)
13491349
sectsize = atoi(optarg);
13501350
break;
13511351

1352-
# ifdef CONFIG_MTD_CONFIG
1352+
# ifndef CONFIG_MTD_CONFIG_NONE
13531353
case 'c':
13541354
configdata = atoi(optarg);
13551355
break;
@@ -1435,7 +1435,7 @@ int cmd_lomtd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
14351435
setup.sectsize = sectsize; /* The sector size to use with the block device */
14361436
setup.erasesize = erasesize; /* The sector size to use with the block device */
14371437
setup.offset = offset; /* An offset that may be applied to the device */
1438-
# ifdef CONFIG_MTD_CONFIG
1438+
# ifndef CONFIG_MTD_CONFIG_NONE
14391439
setup.configdata = configdata; /* Is a loop mtdconfig device */
14401440
# endif
14411441

0 commit comments

Comments
 (0)