projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs direct: Add proper error handler for too many files open
[yaffs2.git]
/
direct
/
yaffsfs.c
diff --git
a/direct/yaffsfs.c
b/direct/yaffsfs.c
index ea3322374a2b26562af4ecc59ae9caf3faf72909..573c68b3b5ef60a96cbea3252f530cd882547d00 100644
(file)
--- a/
direct/yaffsfs.c
+++ b/
direct/yaffsfs.c
@@
-612,7
+612,10
@@
int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
handle = yaffsfs_GetNewHandle();
handle = yaffsfs_GetNewHandle();
- if(handle >= 0){
+ if(handle < 0){
+ yaffsfs_SetError(-ENFILE);
+ errorReported = 1;
+ } else {
yh = yaffsfs_GetHandlePointer(handle);
yh = yaffsfs_GetHandlePointer(handle);