You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/07/21 16:03:27 UTC
[incubator-nuttx-apps] branch master updated: nsh: Fixed typos in comments.
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/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new d7ec4e51b nsh: Fixed typos in comments.
d7ec4e51b is described below
commit d7ec4e51b54cfc04124f1bf63baf644e0c5f78d6
Author: Fotis Panagiotopoulos <f....@amco.gr>
AuthorDate: Thu Jul 21 13:04:23 2022 +0300
nsh: Fixed typos in comments.
---
nshlib/nsh.h | 6 +++---
nshlib/nsh_fsutils.c | 11 +++++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/nshlib/nsh.h b/nshlib/nsh.h
index 60798cc9b..8c7baf4bb 100644
--- a/nshlib/nsh.h
+++ b/nshlib/nsh.h
@@ -1329,8 +1329,8 @@ int nsh_readfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
* Input Paratemets:
* vtbl - session vtbl
* cmd - NSH command name to use in error reporting
- * buffer - The pointer of writting buffer
- * len - The length of writting buffer
+ * buffer - The pointer of writing buffer
+ * len - The length of writing buffer
* filepath - The full path to the file to be dumped
*
* Returned Value:
@@ -1409,7 +1409,7 @@ FAR char *nsh_trimspaces(FAR char *str);
* Name: nsh_getdirpath
*
* Description:
- * Combine dirpath with a file/path, this will genarated a new string,
+ * Combine dirpath with a file/path, this will generated a new string,
* which need free outside.
*
* Input Parameters:
diff --git a/nshlib/nsh_fsutils.c b/nshlib/nsh_fsutils.c
index 9f16f6036..7cb95a597 100644
--- a/nshlib/nsh_fsutils.c
+++ b/nshlib/nsh_fsutils.c
@@ -79,6 +79,7 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
cmd, filepath);
}
#endif
+
nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO);
return ERROR;
}
@@ -183,7 +184,7 @@ int nsh_catfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
*
* Description:
* Read a small file into a user-provided buffer. The data is assumed to
- * be a string and is guaranteed to be NUL-termined. An error occurs if
+ * be a string and is guaranteed to be NUL-terminated. An error occurs if
* the file content (+terminator) will not fit into the provided 'buffer'.
*
* Input Parameters:
@@ -291,8 +292,8 @@ int nsh_readfile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
* Input Paratemets:
* vtbl - session vtbl
* cmd - NSH command name to use in error reporting
- * buffer - The pointer of writting buffer
- * len - The length of writting buffer
+ * buffer - The pointer of writing buffer
+ * len - The length of writing buffer
* filepath - The full path to the file to be dumped
*
* Returned Value:
@@ -322,6 +323,7 @@ int nsh_writefile(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
cmd, filepath);
}
#endif
+
nsh_error(vtbl, g_fmtcmdfailed, cmd, "open", NSH_ERRNO);
return ERROR;
}
@@ -379,6 +381,7 @@ int nsh_foreach_direntry(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
"nsh: %s: Could not open %s (is procfs mounted?)\n",
cmd, dirpath);
}
+
#endif
nsh_error(vtbl, g_fmtcmdfailed, cmd, "opendir", NSH_ERRNO);
return ERROR;
@@ -483,7 +486,7 @@ FAR char *nsh_trimspaces(FAR char *str)
* Name: nsh_getdirpath
*
* Description:
- * Combine dirpath with a file/path, this will genarated a new string,
+ * Combine dirpath with a file/path, this will generated a new string,
* which need free outside.
*
* Input Parameters: