summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-29 23:50:38 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-29 23:50:38 +0000
commit2272d60c0c7045ffdcfdb3d2c37ed8849a129783 (patch)
treeb8543782f9977c3af57467b7aeb0a8478d7704e4 /nuttx/fs/nxffs
parent8698f6ddcaebf63f5324b3c28d95dcb315a16897 (diff)
downloadpx4-nuttx-2272d60c0c7045ffdcfdb3d2c37ed8849a129783.tar.gz
px4-nuttx-2272d60c0c7045ffdcfdb3d2c37ed8849a129783.tar.bz2
px4-nuttx-2272d60c0c7045ffdcfdb3d2c37ed8849a129783.zip
Some initial NXFFS bugfixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3541 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/nxffs')
-rw-r--r--nuttx/fs/nxffs/nxffs.h3
-rw-r--r--nuttx/fs/nxffs/nxffs_initialize.c1
-rw-r--r--nuttx/fs/nxffs/nxffs_inode.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/fs/nxffs/nxffs.h b/nuttx/fs/nxffs/nxffs.h
index 5b1809ebc..41421c57e 100644
--- a/nuttx/fs/nxffs/nxffs.h
+++ b/nuttx/fs/nxffs/nxffs.h
@@ -157,8 +157,9 @@
*
* INODE_STATE_FILE - The inode is a valid usuable, file
* INODE_STATE_DELETED - The inode has been deleted.
+ * Other values - The inode is bad and has an invalid state.
*
- * Care is taken so that the GOOD to BAD transition only involves burning
+ * Care is taken so that the VALID to DELETED transition only involves burning
* bits from the erased to non-erased state.
*/
diff --git a/nuttx/fs/nxffs/nxffs_initialize.c b/nuttx/fs/nxffs/nxffs_initialize.c
index fc2d97b65..4b4e272a2 100644
--- a/nuttx/fs/nxffs/nxffs_initialize.c
+++ b/nuttx/fs/nxffs/nxffs_initialize.c
@@ -182,6 +182,7 @@ int nxffs_initialize(FAR struct mtd_dev_s *mtd)
/* Initialize the NXFFS volume structure */
volume->mtd = mtd;
+ sem_init(&volume->exclsem, 0, 1);
/* Get the volume geometry. (casting to uintptr_t first eliminates
* complaints on some architectures where the sizeof long is different
diff --git a/nuttx/fs/nxffs/nxffs_inode.c b/nuttx/fs/nxffs/nxffs_inode.c
index ae61c9d24..cf87fdb5b 100644
--- a/nuttx/fs/nxffs/nxffs_inode.c
+++ b/nuttx/fs/nxffs/nxffs_inode.c
@@ -42,6 +42,7 @@
#include <nuttx/config.h>
#include <string.h>
+#include <crc32.h>
#include <assert.h>
#include <errno.h>
#include <debug.h>