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

@@ -988,6 +988,14 @@ void nsh_usbtrace(void);
# endif
#endif /* CONFIG_NET */
#if defined(CONFIG_BOARDCTL_POWEROFF) && !defined(CONFIG_NSH_DISABLE_POWEROFF)
int cmd_poweroff(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif
#if defined(CONFIG_BOARDCTL_RESET) && !defined(CONFIG_NSH_DISABLE_REBOOT)
int cmd_reboot(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
#endif
#if (defined(CONFIG_BOARDCTL_POWEROFF) || defined(CONFIG_BOARDCTL_RESET)) && \
!defined(CONFIG_NSH_DISABLE_SHUTDOWN)
int cmd_shutdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);