mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
Fixed build issues
This commit is contained in:

committed by
Xiang Xiao

parent
23ec80fa30
commit
0d74608b2c
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user