mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
rptun_ping: add sleep param to rptun_ping
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
79a137495a
commit
a109a6e58b
2 changed files with 6 additions and 4 deletions
|
|
@ -476,9 +476,9 @@ static const struct cmdmap_s g_cmdmap[] =
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_RPTUN) && !defined(CONFIG_NSH_DISABLE_RPTUN)
|
||||
{ "rptun", cmd_rptun, 3, 6,
|
||||
"<start|stop|reset|panic|dump|ping> <path|all> "
|
||||
"[value|times length ack]" },
|
||||
{ "rptun", cmd_rptun, 3, 7,
|
||||
"<start|stop|reset|panic|dump|ping> <path|all>"
|
||||
" [value|times length ack sleep]" },
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_SET
|
||||
|
|
|
|||
|
|
@ -393,7 +393,8 @@ static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
|
|||
}
|
||||
else if (strcmp(argv[1], "ping") == 0)
|
||||
{
|
||||
if (argv[3] == 0 || argv[4] == 0 || argv[5] == 0)
|
||||
if (argv[3] == 0 || argv[4] == 0 ||
|
||||
argv[5] == 0 || argv[6] == 0)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
|
|
@ -401,6 +402,7 @@ static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
|
|||
ping.times = atoi(argv[3]);
|
||||
ping.len = atoi(argv[4]);
|
||||
ping.ack = atoi(argv[5]);
|
||||
ping.sleep = atoi(argv[6]);
|
||||
|
||||
cmd = RPTUNIOC_PING;
|
||||
val = (unsigned long)&ping;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue