summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs/nxffs_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs/nxffs/nxffs_dump.c')
-rw-r--r--nuttx/fs/nxffs/nxffs_dump.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/nuttx/fs/nxffs/nxffs_dump.c b/nuttx/fs/nxffs/nxffs_dump.c
index fbd3807d3..889f10b52 100644
--- a/nuttx/fs/nxffs/nxffs_dump.c
+++ b/nuttx/fs/nxffs/nxffs_dump.c
@@ -194,7 +194,7 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo,
if (crc != ecrc)
{
- fdbg(g_format, blkinfo->block, offset, "INODE", "CRC ", datlen);
+ fdbg(g_format, blkinfo->block, offset, "INODE", "CRC BAD", datlen);
return ERROR;
}
@@ -212,7 +212,10 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo,
{
fdbg(g_format, blkinfo->block, offset, "INODE", "CORRUPT", datlen);
}
- return noffs + inode.namlen - offset;
+
+ /* Return the block-relative offset to the next byte after the inode name */
+
+ return noffs + inode.namlen - offset - blkinfo->offset;
}
#endif
@@ -257,7 +260,7 @@ static inline ssize_t nxffs_analyzedata(FAR struct nxffs_blkinfo_s *blkinfo,
if (crc != ecrc)
{
- fdbg(g_format, blkinfo->block, offset, "DATA ", "CRC ", datlen);
+ fdbg(g_format, blkinfo->block, offset, "DATA ", "CRC BAD", datlen);
return ERROR;
}