apps/nshlib: Add a new NSH losmart command. losmart setups up a loop device for the smart MTD driver similar to losetup but with different syntax. From Ket Petit.

This commit is contained in:
Ken Pettit
2015-11-28 09:05:05 -06:00
committed by Gregory Nutt
parent 92b1eb36c8
commit d82b8a2e23
5 changed files with 190 additions and 1 deletions

View File

@@ -248,6 +248,12 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)
# if defined(CONFIG_SMART_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSMART)
{ "losmart", cmd_losmart, 2, 11, "[-d <dev-path>] | [[-m <minor>] [-o <offset>] [-e <erase-size>] [-s <sect-size>] [-r] <file-path>]" },
# endif
#endif
#if CONFIG_NFILE_DESCRIPTORS > 0
# ifndef CONFIG_NSH_DISABLE_LS
{ "ls", cmd_ls, 1, 5, "[-lRs] <dir-path>" },