summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs/nxffs_inode.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-31 17:04:03 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-10-31 17:04:03 +0000
commit1670d2d218ad2dbcf33c53dbce818b8514836f65 (patch)
tree245651e92a8faef6478b57a7d13088f017443c13 /nuttx/fs/nxffs/nxffs_inode.c
parent2ebabef806fdfc5b9ddbac2a71bad3a62a3e91f4 (diff)
downloadpx4-nuttx-1670d2d218ad2dbcf33c53dbce818b8514836f65.tar.gz
px4-nuttx-1670d2d218ad2dbcf33c53dbce818b8514836f65.tar.bz2
px4-nuttx-1670d2d218ad2dbcf33c53dbce818b8514836f65.zip
Fix an NXFFS initialization problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4074 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nxffs/nxffs_inode.c')
-rw-r--r--nuttx/fs/nxffs/nxffs_inode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/fs/nxffs/nxffs_inode.c b/nuttx/fs/nxffs/nxffs_inode.c
index 121c1f6db..3362d1f29 100644
--- a/nuttx/fs/nxffs/nxffs_inode.c
+++ b/nuttx/fs/nxffs/nxffs_inode.c
@@ -470,9 +470,11 @@ off_t nxffs_inodeend(FAR struct nxffs_volume_s *volume,
if (entry->doffset)
{
- /* This is the maximum size of one data block */
+ /* This is the maximum size of one data block. It is the physcal size
+ * of the block minus the minimum number of headers: block sna data
+ */
- uint16_t maxsize = volume->geo.blocksize - SIZEOF_NXFFS_DATA_HDR;
+ uint16_t maxsize = volume->geo.blocksize - SIZEOF_NXFFS_BLOCK_HDR - SIZEOF_NXFFS_DATA_HDR;
/* This is the minimum number of blocks require to span all of the
* inode data. One additional block could possibly be required -- we