yaffs direct: Handle ENOSPC error on open
authorCharles Manning <cdhmanning@gmail.com>
Mon, 1 Nov 2010 00:40:52 +0000 (13:40 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 1 Nov 2010 00:40:52 +0000 (13:40 +1300)
Fix up handling of ENOSPC  on open creating a file.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/yaffsfs.c

index 3ee5f0c..455e6dd 100644 (file)
@@ -732,7 +732,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                } else {
                        yaffsfs_PutHandle(handle);
                        if(!errorReported) {
-                               yaffsfs_SetError(-EACCES);
+                               yaffsfs_SetError(!obj ? -ENOSPC : -EACCES);
                                errorReported = 1;
                        }
                        handle = -1;