mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
Add poweroff and reboot NSH commands as alternatives to the shutdown command
This commit is contained in:
@@ -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>" },
|
||||
|
Reference in New Issue
Block a user