mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-05 05:07:49 +00:00
apps: add rptun /dev/rptun/xx panic cmd
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
de61706552
commit
c57677c3ce
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue