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 0b236ff86669f0545e38ef0df85bb807c2b1a5f5..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);
@@
-2330,6
+2333,11
@@
int yaffs_n_handles(const YCHAR *path)
return yaffsfs_CountHandles(obj);
}
return yaffsfs_CountHandles(obj);
}
+int yaffs_get_error(void)
+{
+ return yaffsfs_GetLastError();
+}
+
int yaffs_dump_dev(const YCHAR *path)
{
#if 0
int yaffs_dump_dev(const YCHAR *path)
{
#if 0