Add poweroff and reboot NSH commands as alternatives to the shutdown command

This commit is contained in:
Gregory Nutt
2015-07-04 12:44:24 -06:00
parent 165637ce27
commit 95eea325cf
5 changed files with 119 additions and 24 deletions

View File

@@ -329,6 +329,10 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#if defined(CONFIG_BOARDCTL_POWEROFF) && !defined(CONFIG_NSH_DISABLE_POWEROFF)
{ "poweroff", cmd_poweroff, 1, 1, NULL },
#endif
#ifndef CONFIG_NSH_DISABLE_PS
{ "ps", cmd_ps, 1, 1, NULL },
#endif
@@ -345,6 +349,10 @@ static const struct cmdmap_s g_cmdmap[] =
# endif
#endif
#if defined(CONFIG_BOARDCTL_RESET) && !defined(CONFIG_NSH_DISABLE_REBOOT)
{ "reboot", cmd_reboot, 1, 1, NULL },
#endif
#ifdef NSH_HAVE_DIROPTS
# ifndef CONFIG_NSH_DISABLE_RM
{ "rm", cmd_rm, 2, 2, "<file-path>" },