summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs/nxffs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs/nxffs/nxffs_inode.c')
-rw-r--r--nuttx/fs/nxffs/nxffs_inode.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/nuttx/fs/nxffs/nxffs_inode.c b/nuttx/fs/nxffs/nxffs_inode.c
index bf21eafcd..287dcae33 100644
--- a/nuttx/fs/nxffs/nxffs_inode.c
+++ b/nuttx/fs/nxffs/nxffs_inode.c
@@ -1,7 +1,7 @@
/****************************************************************************
* fs/nxffs/nxffs_inode.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References: Linux/Documentation/filesystems/romfs.txt
@@ -85,7 +85,7 @@
* Zero on success. Otherwise, a negated errno value is returned
* indicating the nature of the failure.
*
- * On return, the
+ * On return, the
*
****************************************************************************/
@@ -117,7 +117,7 @@ static int nxffs_rdentry(FAR struct nxffs_volume_s *volume, off_t offset,
ret = -ENOENT;
goto errout_no_offset;
}
-
+
/* Copy the packed header into the user-friendly buffer */
entry->hoffset = offset;
@@ -139,11 +139,11 @@ static int nxffs_rdentry(FAR struct nxffs_volume_s *volume, off_t offset,
entry->name = (FAR char *)kmalloc(namlen + 1);
if (!entry->name)
{
- fdbg("Failed to allocate name, namlen: %d\n", namlen);
+ fdbg("ERROR: Failed to allocate name, namlen: %d\n", namlen);
ret = -ENOMEM;
goto errout_no_offset;
}
-
+
/* Seek to the expected location of the name in FLASH */
nxffs_ioseek(volume, entry->noffset);
@@ -151,11 +151,11 @@ static int nxffs_rdentry(FAR struct nxffs_volume_s *volume, off_t offset,
/* Make sure that the block is in memory (the name may not be in the
* same block as the inode header.
*/
-
+
ret = nxffs_rdcache(volume, volume->ioblock);
if (ret < 0)
{
- fdbg("nxffsx_rdcache failed: %d\n", -ret);
+ fdbg("ERROR: nxffsx_rdcache failed: %d\n", -ret);
goto errout_with_name;
}
@@ -255,7 +255,7 @@ void nxffs_freeentry(FAR struct nxffs_entry_s *entry)
* offset - The FLASH memory offset to begin searching.
* entry - A pointer to memory provided by the caller in which to return
* the inode description.
- *
+ *
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno is returned
* that indicates the nature of the failure.
@@ -275,7 +275,7 @@ int nxffs_nextentry(FAR struct nxffs_volume_s *volume, off_t offset,
nxffs_ioseek(volume, offset);
/* Then begin searching */
-
+
nerased = 0;
nmagic = 0;
for (;;)
@@ -285,7 +285,7 @@ int nxffs_nextentry(FAR struct nxffs_volume_s *volume, off_t offset,
ch = nxffs_getc(volume, SIZEOF_NXFFS_INODE_HDR - nmagic);
if (ch < 0)
{
- fvdbg("nxffs_getc failed: %d\n", -ch);
+ fdbg("ERROR: nxffs_getc failed: %d\n", -ch);
return ch;
}
@@ -340,7 +340,7 @@ int nxffs_nextentry(FAR struct nxffs_volume_s *volume, off_t offset,
* indicate the beginning of an NXFFS inode.
*/
- else
+ else
{
/* The the FLASH offset where we found the matching magic number */
@@ -498,5 +498,3 @@ off_t nxffs_inodeend(FAR struct nxffs_volume_s *volume,
DEBUGASSERT(entry->noffset);
return entry->noffset + strlen(entry->name);
}
-
-