nshlib: Align the command table

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-04-01 20:58:29 +08:00 committed by Petro Karashchenko
parent 4f7dd7be7c
commit 49418d6de5

View File

@ -105,9 +105,9 @@ static const struct cmdmap_s g_cmdmap[] =
#endif #endif
#ifdef CONFIG_NSH_ALIAS #ifdef CONFIG_NSH_ALIAS
{ "alias", cmd_alias, 1, CONFIG_NSH_MAXARGUMENTS, { "alias", cmd_alias, 1, CONFIG_NSH_MAXARGUMENTS,
"[name[=value] ... ]" }, "[name[=value] ... ]" },
{ "unalias", cmd_unalias, 1, CONFIG_NSH_MAXARGUMENTS, { "unalias", cmd_unalias, 1, CONFIG_NSH_MAXARGUMENTS,
"[-a] name [name ... ]" }, "[-a] name [name ... ]" },
#endif #endif
@ -126,7 +126,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif #endif
#ifndef CONFIG_NSH_DISABLE_BASENAME #ifndef CONFIG_NSH_DISABLE_BASENAME
{ "basename", cmd_basename, 2, 3, "<path> [<suffix>]" }, { "basename", cmd_basename, 2, 3, "<path> [<suffix>]" },
#endif #endif
#if defined(CONFIG_BOARDCTL_BOOT_IMAGE) && !defined(CONFIG_NSH_DISABLE_BOOT) #if defined(CONFIG_BOARDCTL_BOOT_IMAGE) && !defined(CONFIG_NSH_DISABLE_BOOT)
@ -134,7 +134,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif #endif
#if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_LOOPS) #if !defined(CONFIG_NSH_DISABLESCRIPT) && !defined(CONFIG_NSH_DISABLE_LOOPS)
{ "break", cmd_break, 1, 1, NULL }, { "break", cmd_break, 1, 1, NULL },
#endif #endif
#ifndef CONFIG_NSH_DISABLE_CAT #ifndef CONFIG_NSH_DISABLE_CAT
@ -279,7 +279,7 @@ static const struct cmdmap_s g_cmdmap[] =
#ifndef CONFIG_DISABLE_MOUNTPOINT #ifndef CONFIG_DISABLE_MOUNTPOINT
# if defined(CONFIG_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSETUP) # if defined(CONFIG_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSETUP)
{ "losetup", cmd_losetup, 3, 6, { "losetup", cmd_losetup, 3, 6,
"[-d <dev-path>] | [[-o <offset>] [-r] [-s <sect-size>] " "[-d <dev-path>] | [[-o <offset>] [-r] [-s <sect-size>] "
"<dev-path> <file-path>]" }, "<dev-path> <file-path>]" },
# endif # endif
@ -287,7 +287,7 @@ static const struct cmdmap_s g_cmdmap[] =
#ifndef CONFIG_DISABLE_MOUNTPOINT #ifndef CONFIG_DISABLE_MOUNTPOINT
# if defined(CONFIG_SMART_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSMART) # if defined(CONFIG_SMART_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSMART)
{ "losmart", cmd_losmart, 2, 11, { "losmart", cmd_losmart, 2, 11,
"[-d <dev-path>] | [[-m <minor>] [-o <offset>] [-e <erase-size>] " "[-d <dev-path>] | [[-m <minor>] [-o <offset>] [-e <erase-size>] "
"[-s <sect-size>] [-r] <file-path>]" }, "[-s <sect-size>] [-r] <file-path>]" },
# endif # endif
@ -295,7 +295,7 @@ static const struct cmdmap_s g_cmdmap[] =
#ifndef CONFIG_DISABLE_MOUNTPOINT #ifndef CONFIG_DISABLE_MOUNTPOINT
# if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD) # if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD)
{ "lomtd", cmd_lomtd, 3, 9, { "lomtd", cmd_lomtd, 3, 9,
"[-d <dev-path>] | [[-o <offset>] [-e <erase-size>] " "[-d <dev-path>] | [[-o <offset>] [-e <erase-size>] "
"[-s <sect-size>] <dev-path> <file-path>]]" }, "[-s <sect-size>] <dev-path> <file-path>]]" },
# endif # endif
@ -355,10 +355,10 @@ static const struct cmdmap_s g_cmdmap[] =
defined(CONFIG_FSUTILS_MKSMARTFS) defined(CONFIG_FSUTILS_MKSMARTFS)
# ifndef CONFIG_NSH_DISABLE_MKSMARTFS # ifndef CONFIG_NSH_DISABLE_MKSMARTFS
# ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS # ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS
{ "mksmartfs", cmd_mksmartfs, 2, 6, { "mksmartfs", cmd_mksmartfs, 2, 6,
"[-s <sector-size>] [-f] <path> [<num-root-directories>]" }, "[-s <sector-size>] [-f] <path> [<num-root-directories>]" },
# else # else
{ "mksmartfs", cmd_mksmartfs, 2, 5, "[-s <sector-size>] [-f] <path>" }, { "mksmartfs", cmd_mksmartfs, 2, 5, "[-s <sector-size>] [-f] <path>" },
# endif # endif
# endif # endif
#endif #endif
@ -412,12 +412,12 @@ static const struct cmdmap_s g_cmdmap[] =
#endif #endif
#if defined(CONFIG_PM) && !defined(CONFIG_NSH_DISABLE_PMCONFIG) #if defined(CONFIG_PM) && !defined(CONFIG_NSH_DISABLE_PMCONFIG)
{ "pmconfig", cmd_pmconfig, 1, 4, { "pmconfig", cmd_pmconfig, 1, 4,
"[stay|relax] [normal|idle|standby|sleep] [domain]" }, "[stay|relax] [normal|idle|standby|sleep] [domain]" },
#endif #endif
#if defined(CONFIG_BOARDCTL_POWEROFF) && !defined(CONFIG_NSH_DISABLE_POWEROFF) #if defined(CONFIG_BOARDCTL_POWEROFF) && !defined(CONFIG_NSH_DISABLE_POWEROFF)
{ "poweroff", cmd_poweroff, 1, 2, NULL }, { "poweroff", cmd_poweroff, 1, 2, NULL },
#endif #endif
#ifndef CONFIG_NSH_DISABLE_PRINTF #ifndef CONFIG_NSH_DISABLE_PRINTF
@ -456,7 +456,7 @@ static const struct cmdmap_s g_cmdmap[] =
#endif #endif
#if defined(CONFIG_BOARDCTL_RESET_CAUSE) && !defined(CONFIG_NSH_DISABLE_RESET_CAUSE) #if defined(CONFIG_BOARDCTL_RESET_CAUSE) && !defined(CONFIG_NSH_DISABLE_RESET_CAUSE)
{ "resetcause", cmd_reset_cause, 1, 1, NULL }, { "resetcause", cmd_reset_cause, 1, 1, NULL },
#endif #endif
#ifdef NSH_HAVE_DIROPTS #ifdef NSH_HAVE_DIROPTS
@ -586,10 +586,10 @@ static const struct cmdmap_s g_cmdmap[] =
defined(CONFIG_NSH_LOGIN_PASSWD) && \ defined(CONFIG_NSH_LOGIN_PASSWD) && \
!defined(CONFIG_FSUTILS_PASSWD_READONLY) !defined(CONFIG_FSUTILS_PASSWD_READONLY)
# ifndef CONFIG_NSH_DISABLE_USERADD # ifndef CONFIG_NSH_DISABLE_USERADD
{ "useradd", cmd_useradd, 3, 3, "<username> <password>" }, { "useradd", cmd_useradd, 3, 3, "<username> <password>" },
# endif # endif
# ifndef CONFIG_NSH_DISABLE_USERDEL # ifndef CONFIG_NSH_DISABLE_USERDEL
{ "userdel", cmd_userdel, 2, 2, "<username>" }, { "userdel", cmd_userdel, 2, 2, "<username>" },
# endif # endif
#endif #endif