diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-05 18:21:44 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-05 18:21:44 +0000 |
commit | fe8430b28928dd36a9d881b4f02ce56d91dec6a0 (patch) | |
tree | 4aac5e15a1f92756064fb8cbc477ea761457b536 /nuttx/fs/nxffs/nxffs_initialize.c | |
parent | 697ebec39680857ebbf7537e38a88b1370b7c23f (diff) | |
download | px4-nuttx-fe8430b28928dd36a9d881b4f02ce56d91dec6a0.tar.gz px4-nuttx-fe8430b28928dd36a9d881b4f02ce56d91dec6a0.tar.bz2 px4-nuttx-fe8430b28928dd36a9d881b4f02ce56d91dec6a0.zip |
NXFFS is basically functional -- more testing needed
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3565 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nxffs/nxffs_initialize.c')
-rw-r--r-- | nuttx/fs/nxffs/nxffs_initialize.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c index c040fa649..7fd1d51fc 100644 --- a/nuttx/fs/nxffs/nxffs_initialize.c +++ b/nuttx/fs/nxffs/nxffs_initialize.c @@ -361,14 +361,9 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) volume->inoffset = entry.hoffset; fvdbg("First inode at offset %d\n", volume->inoffset); - /* Discard this entry and set the next offset using the rw data - * length as the offset increment. This is, of course, not accurate - * because it does not account for the data headers that enclose the - * data. But it is guaranteed to be less than or equal to the - * correct offset and, hence, better then searching byte-for-byte. - */ + /* Discard this entry and set the next offset. */ - offset = entry.doffset + entry.datlen; + offset = nxffs_inodeend(volume, &entry); nxffs_freeentry(&entry); } @@ -378,9 +373,9 @@ int nxffs_limits(FAR struct nxffs_volume_s *volume) { while ((ret = nxffs_nextentry(volume, offset, &entry)) == OK) { - /* Discard the entry and guess the next offset (see comments above). */ + /* Discard the entry and guess the next offset. */ - offset = entry.doffset + entry.datlen; + offset = nxffs_inodeend(volume, &entry); nxffs_freeentry(&entry); } fvdbg("Last inode before offset %d\n", offset); |