This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 7047fa5bd nsh syscmds: add CONFIG_RPTUN_PING when use rptun_ping
7047fa5bd is described below
commit 7047fa5bde30e848548210efd03e50239b81f6a8
Author: wangyongrong <[email protected]>
AuthorDate: Mon Dec 4 15:41:02 2023 +0800
nsh syscmds: add CONFIG_RPTUN_PING when use rptun_ping
Signed-off-by: wangyongrong <[email protected]>
---
nshlib/nsh_syscmds.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index 82bc405d2..2797874af 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -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]);