mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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 <zhaoxingyu1@xiaomi.com>
This commit is contained in:
parent
102c078834
commit
d9d434d97e
2 changed files with 5 additions and 5 deletions
|
|
@ -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>]]"),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue