#endif
-const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.3 2003-02-19 00:29:55 charles Exp $";
+const char *yaffsfs_c_version="$Id: yaffsfs.c,v 1.4 2003-02-24 23:49:29 charles Exp $";
// configurationList is the list of devices that are supported
static yaffsfs_DeviceConfiguration *yaffsfs_configurationList;
int alreadyExclusive = 0;
int openDenied = 0;
int symDepth = 0;
+ int errorReported = 0;
int i;
openDenied = 1;
}
+ // Open should fail if O_CREAT and O_EXCL are specified
+ if((oflag & O_EXCL) && (oflag & O_CREAT))
+ {
+ openDenied = 1;
+ yaffsfs_SetError(-EEXIST);
+ errorReported = 1;
+ }
+
// Check file permissions
if( (oflag & (O_RDWR | O_WRONLY)) == 0 && // ie O_RDONLY
!(obj->st_mode & S_IREAD))
else
{
yaffsfs_PutHandle(handle);
- yaffsfs_SetError(-EACCESS);
+ if(!errorReported)
+ {
+ yaffsfs_SetError(-EACCESS);
+ errorReported = 1;
+ }
handle = -1;
}
dev->passiveGarbageCollections
);
}
+ return 0;
}