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 2020/11/22 03:38:42 UTC
[incubator-nuttx] 04/22: fs/nxffs/nxffs_open.c: Appease nxstyle
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.git
commit e1a8f8a736c8f14cc4901a1d235e4ce4900e9681
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Nov 22 09:43:25 2020 +0900
fs/nxffs/nxffs_open.c: Appease nxstyle
---
fs/nxffs/nxffs_open.c | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
diff --git a/fs/nxffs/nxffs_open.c b/fs/nxffs/nxffs_open.c
index c08a054..80b1e1e 100644
--- a/fs/nxffs/nxffs_open.c
+++ b/fs/nxffs/nxffs_open.c
@@ -99,7 +99,8 @@ static struct nxffs_wrfile_s g_wrfile;
*
* On successful return the following are also valid:
*
- * wrfile->ofile.entry.hoffset - FLASH offset to candidate header position
+ * wrfile->ofile.entry.hoffset - FLASH offset to candidate header
+ * position
* volume->ioblock - Read/write block number of the block containing the
* header position
* volume->iooffset - The offset in the block to the candidate header
@@ -217,7 +218,8 @@ static inline int nxffs_nampos(FAR struct nxffs_volume_s *volume,
*
* On successful return the following are also valid:
*
- * wrfile->ofile.entry.hoffset - FLASH offset to candidate header position
+ * wrfile->ofile.entry.hoffset - FLASH offset to candidate header
+ * position
* volume->ioblock - Read/write block number of the block containing the
* header position
* volume->iooffset - The offset in the block to the candidate header
@@ -451,9 +453,10 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
else if ((oflags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
{
- /* Just schedule the removal the file and fall through to re-create it.
- * Note that the old file of the same name will not actually be removed
- * until the new file is successfully written.
+ /* Just schedule the removal the file and fall through to re-create
+ * it.
+ * Note that the old file of the same name will not actually be
+ * removed until the new file is successfully written.
*/
truncate = true;
@@ -465,7 +468,8 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
else
{
- ferr("ERROR: File %s exists and we were not asked to truncate it\n");
+ ferr("ERROR: File %s exists and we were not asked to "
+ "truncate it\n");
ret = -ENOSYS;
goto errout_with_exclsem;
}
@@ -501,7 +505,8 @@ static inline int nxffs_wropen(FAR struct nxffs_volume_s *volume,
wrfile = &g_wrfile;
memset(wrfile, 0, sizeof(struct nxffs_wrfile_s));
#else
- wrfile = (FAR struct nxffs_wrfile_s *)kmm_zalloc(sizeof(struct nxffs_wrfile_s));
+ wrfile = (FAR struct nxffs_wrfile_s *)
+ kmm_zalloc(sizeof(struct nxffs_wrfile_s));
if (!wrfile)
{
ret = -ENOMEM;
@@ -736,7 +741,8 @@ static inline int nxffs_rdopen(FAR struct nxffs_volume_s *volume,
{
/* Not already open.. create a new open structure */
- ofile = (FAR struct nxffs_ofile_s *)kmm_zalloc(sizeof(struct nxffs_ofile_s));
+ ofile = (FAR struct nxffs_ofile_s *)
+ kmm_zalloc(sizeof(struct nxffs_ofile_s));
if (!ofile)
{
ferr("ERROR: ofile allocation failed\n");
@@ -876,7 +882,8 @@ static inline int nxffs_wrclose(FAR struct nxffs_volume_s *volume,
ret = nxffs_wrblkhdr(volume, wrfile);
if (ret < 0)
{
- ferr("ERROR: Failed to write the final block of the file: %d\n", -ret);
+ ferr("ERROR: Failed to write the final block of the file: %d\n",
+ -ret);
goto errout;
}
}
@@ -970,7 +977,8 @@ FAR struct nxffs_ofile_s *nxffs_findofile(FAR struct nxffs_volume_s *volume,
*
****************************************************************************/
-FAR struct nxffs_wrfile_s *nxffs_findwriter(FAR struct nxffs_volume_s *volume)
+FAR struct nxffs_wrfile_s *nxffs_findwriter(
+ FAR struct nxffs_volume_s *volume)
{
/* We can tell if the write is in-use because it will have an allocated
* name attached.
@@ -1205,8 +1213,8 @@ errout:
* entry - Describes the inode header to write
*
* Returned Value:
- * Zero is returned on success; Otherwise, a negated errno value is returned
- * indicating the nature of the failure.
+ * Zero is returned on success; Otherwise, a negated errno value is
+ * returned indicating the nature of the failure.
*
****************************************************************************/
@@ -1288,8 +1296,8 @@ errout:
* entry - Describes the new inode entry
*
* Returned Value:
- * Zero is returned on success; Otherwise, a negated errno value is returned
- * indicating the nature of the failure.
+ * Zero is returned on success; Otherwise, a negated errno value is
+ * returned indicating the nature of the failure.
*
****************************************************************************/