pkarashchenko commented on code in PR #1697:
URL: https://github.com/apache/nuttx-apps/pull/1697#discussion_r1156044184
##########
nshlib/nsh_syscmds.c:
##########
@@ -318,6 +318,52 @@ int cmd_poweroff(FAR struct nsh_vtbl_s *vtbl, int argc,
FAR char **argv)
}
#endif
+/****************************************************************************
+ * Name: cmd_boot
+ ****************************************************************************/
+
+#if defined(CONFIG_BOARDCTL_BOOT_IMAGE) && !defined(CONFIG_NSH_DISABLE_BOOT)
+int cmd_boot(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
+{
+ struct boardioc_boot_info_s info;
+
+ memset(&info, 0, sizeof(info));
+
+ /* Invoke the BOARDIOC_BOOT_IMAGE board control to reset the board. If
+ * the board_boot_image() function returns, then it was not possible to
+ * boot the image due to some constraints.
+ */
+
+ switch (argc)
+ {
+ default:
+ info.header_size = strtoul(argv[2], NULL, 0);
+
+ /* Go through */
+
+ case 1:
+ info.path = argv[1];
+
+ /* Go through */
+
+ case 0:
+
+ /* Nothing to do */
Review Comment:
should we print a help message here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]