summaryrefslogtreecommitdiff
path: root/nuttx/fs/nxffs/nxffs_read.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-05 18:21:44 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-05-05 18:21:44 +0000
commitfe8430b28928dd36a9d881b4f02ce56d91dec6a0 (patch)
tree4aac5e15a1f92756064fb8cbc477ea761457b536 /nuttx/fs/nxffs/nxffs_read.c
parent697ebec39680857ebbf7537e38a88b1370b7c23f (diff)
downloadpx4-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_read.c')
-rw-r--r--nuttx/fs/nxffs/nxffs_read.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nuttx/fs/nxffs/nxffs_read.c b/nuttx/fs/nxffs/nxffs_read.c
index f52e21859..cf9bf78e0 100644
--- a/nuttx/fs/nxffs/nxffs_read.c
+++ b/nuttx/fs/nxffs/nxffs_read.c
@@ -101,6 +101,12 @@ static ssize_t nxffs_rdseek(FAR struct nxffs_volume_s *volume,
*/
offset = entry->doffset;
+ if (offset == 0)
+ {
+ /* Zero length files will have no data blocks */
+
+ return -ENOSPC;
+ }
/* Loop until we read the data block containing the desired position */