rptun_ping: add sleep param to rptun_ping
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
79a137495a
commit
a109a6e58b
@ -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…
x
Reference in New Issue
Block a user