From 0d74608b2cd43c25ae6aa789e41c70f799ab9e1c Mon Sep 17 00:00:00 2001 From: Subhra Sankha Sarkar Date: Wed, 28 Oct 2020 17:00:16 +0530 Subject: [PATCH] Fixed build issues --- nshlib/nsh_fsutils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nshlib/nsh_fsutils.c b/nshlib/nsh_fsutils.c index 722976d89..2bb958fb6 100644 --- a/nshlib/nsh_fsutils.c +++ b/nshlib/nsh_fsutils.c @@ -84,6 +84,7 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, fd = open(filepath, O_RDONLY); if (fd < 0) { +#if defined(CONFIG_NSH_PROC_MOUNTPOINT) if (strncmp(filepath, CONFIG_NSH_PROC_MOUNTPOINT, strlen(CONFIG_NSH_PROC_MOUNTPOINT)) == 0) { @@ -92,6 +93,7 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, cmd, filepath, NSH_ERRNO); } else +#endif { nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO); } @@ -330,6 +332,7 @@ int nsh_foreach_direntry(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, { /* Failed to open the directory */ +#if defined(CONFIG_NSH_PROC_MOUNTPOINT) if (strncmp(dirpath, CONFIG_NSH_PROC_MOUNTPOINT, strlen(CONFIG_NSH_PROC_MOUNTPOINT)) == 0) { @@ -338,6 +341,7 @@ int nsh_foreach_direntry(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, cmd, dirpath, NSH_ERRNO); } else +#endif { nsh_error(vtbl, g_fmtnosuch, cmd, "directory", dirpath); }