nsh syscmds: add CONFIG_RPTUN_PING when use rptun_ping
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
This commit is contained in:
parent
5f1de35936
commit
7047fa5bde
@ -517,7 +517,9 @@ int cmd_reset_cause(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
|
||||
static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
|
||||
FAR const char *path, FAR char **argv)
|
||||
{
|
||||
#ifdef CONFIG_RPTUN_PING
|
||||
struct rptun_ping_s ping;
|
||||
#endif
|
||||
unsigned long val = 0;
|
||||
int cmd;
|
||||
int fd;
|
||||
@ -543,6 +545,7 @@ static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
|
||||
{
|
||||
cmd = RPTUNIOC_DUMP;
|
||||
}
|
||||
#ifdef CONFIG_RPTUN_PING
|
||||
else if (strcmp(argv[1], "ping") == 0)
|
||||
{
|
||||
if (argv[3] == 0 || argv[4] == 0 ||
|
||||
@ -560,6 +563,7 @@ static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
|
||||
cmd = RPTUNIOC_PING;
|
||||
val = (unsigned long)&ping;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
nsh_output(vtbl, g_fmtarginvalid, argv[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user