apps: add rptun /dev/rptun/xx panic cmd

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2021-12-22 19:50:48 +08:00 committed by Xiang Xiao
parent de61706552
commit c57677c3ce
2 changed files with 5 additions and 1 deletions

View File

@ -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 <dev-path>" },
{ "rptun", cmd_rptun, 3, 3, "start|stop|panic <dev-path>" },
#endif
#ifndef CONFIG_NSH_DISABLE_SET

View File

@ -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]);