/* Some forward references */
static yaffs_Object *yaffsfs_FindObject(yaffs_Object *relativeDirectory, const YCHAR *path, int symDepth);
static void yaffsfs_RemoveObjectCallback(yaffs_Object *obj);
/* Some forward references */
static yaffs_Object *yaffsfs_FindObject(yaffs_Object *relativeDirectory, const YCHAR *path, int symDepth);
static void yaffsfs_RemoveObjectCallback(yaffs_Object *obj);
- while(cfg && cfg->prefix && cfg->dev){
+ ylist_for_each(cfg, &yaffsfs_deviceList){
+ dev = ylist_entry(cfg, yaffs_Device, devList);
- if( matching && (thisMatchLength > longestMatch)){
- /* Matched prefix */
+ // Skip over any /s in p
+ while(yaffsfs_IsPathDivider(*p))
+ p++;
+
+ // p should now be at the end of the string (ie. fully matched)
+ if(*p)
+ matching = 0;
+
+ if( matching && (thisMatchLength > longestMatch))
+ {
+ // Matched prefix
#ifdef CONFIG_YAFFS_WINCE
int yaffs_get_wince_times(int fd, unsigned *wctime, unsigned *watime, unsigned *wmtime)
#ifdef CONFIG_YAFFS_WINCE
int yaffs_get_wince_times(int fd, unsigned *wctime, unsigned *watime, unsigned *wmtime)
yaffsfs_Lock();
dev = yaffsfs_FindDevice(path,&dummy);
if(dev && dev->isMounted) {
yaffsfs_Lock();
dev = yaffsfs_FindDevice(path,&dummy);
if(dev && dev->isMounted) {
- while(cfg && cfg->prefix && cfg->dev){
- cfg->dev->isMounted = 0;
- cfg->dev->param.removeObjectCallback = yaffsfs_RemoveObjectCallback;
- cfg++;
- }
+void yaffs_RemoveDevice(yaffs_Device *dev)
+{
+ ylist_del_init(&dev->devList);
+}