Skip to content

Commit

Permalink
nsh syscmds: add CONFIG_RPTUN_PING when use rptun_ping
Browse files Browse the repository at this point in the history
Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
  • Loading branch information
wyr-7 authored and xiaoxiang781216 committed Jan 13, 2024
1 parent 5f1de35 commit 7047fa5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nshlib/nsh_syscmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 ||
Expand All @@ -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]);
Expand Down

0 comments on commit 7047fa5

Please sign in to comment.