rptun: add rptun dump support

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-01-19 21:07:59 +08:00 committed by Xiang Xiao
parent d5aae96523
commit e0e5652de4
2 changed files with 6 additions and 1 deletions

View File

@ -470,7 +470,8 @@ static const struct cmdmap_s g_cmdmap[] =
#endif
#if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN)
{ "rptun", cmd_rptun, 3, 4, "start|stop|reset|panic <dev-path> [value]" },
{ "rptun", cmd_rptun, 3, 4,
"start|stop|reset|panic|dump <dev-path> [value]" },
#endif
#ifndef CONFIG_NSH_DISABLE_SET

View File

@ -377,6 +377,10 @@ int cmd_rptun(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
cmd = RPTUNIOC_PANIC;
}
else if (strcmp(argv[1], "dump") == 0)
{
cmd = RPTUNIOC_DUMP;
}
else
{
nsh_output(vtbl, g_fmtarginvalid, argv[1]);