diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index a251c1af9..318ac2a51 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -470,7 +470,7 @@ static const struct cmdmap_s g_cmdmap[] = #endif #if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN) - { "rptun", cmd_rptun, 3, 3, "start|stop " }, + { "rptun", cmd_rptun, 3, 3, "start|stop|panic " }, #endif #ifndef CONFIG_NSH_DISABLE_SET diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c index 471131c24..9470b2c7b 100644 --- a/nshlib/nsh_syscmds.c +++ b/nshlib/nsh_syscmds.c @@ -363,6 +363,10 @@ int cmd_rptun(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { cmd = RPTUNIOC_STOP; } + else if (strcmp(argv[1], "panic") == 0) + { + cmd = RPTUNIOC_PANIC; + } else { nsh_output(vtbl, g_fmtarginvalid, argv[1]);