- Timestamp:
- 10/05/08 00:01:17 (2 months ago)
- Location:
- Whitix/branches/keobject/fs
- Files:
-
- 2 modified
-
icfs/info.c (modified) (1 diff)
-
kfs/dir.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/keobject/fs/icfs/info.c
r1081 r1091 167 167 } 168 168 169 int IcFsRemoveDir(struct KeFsEntry* dir) 170 { 171 return KeFsRemoveDir(dir); 172 } 173 169 174 DWORD IcFsGetRootId() 170 175 { -
Whitix/branches/keobject/fs/kfs/dir.c
r1081 r1091 36 36 37 37 ListForEachEntry(entry,&dir->entries,next) 38 if (!strnicmp(name, entry->name, nameLength) )38 if (!strnicmp(name, entry->name, nameLength) && strlen(entry->name) == nameLength) 39 39 goto found; 40 40 … … 89 89 if ((entry->type & VFS_ATTR_SOFTLINK) && !strnicmp(entry->name, name, nameLength)) 90 90 { 91 /* Follow the softlink. TODO: Must be a simple one? */92 91 struct KeFsEntry* dest; 93 92 … … 154 153 ListAddTail(&entry->next, &dir->entries); 155 154 155 // KePrint("%s\n", entry->name); 156 156 157 return entry; 157 158 } … … 192 193 193 194 SYMBOL_EXPORT(KeFsInitRoot); 195 196 /* Recursively remove dir. */ 197 int KeFsRemoveDir(struct KeFsEntry* entry) 198 { 199 struct KeFsDir* dir; 200 201 if (!entry || !entry->name) 202 return -EFAULT; 203 204 if (!(entry->type & VFS_ATTR_DIR)) 205 return -ENOTDIR; 206 207 dir=&entry->dir; 208 209 /* The only directory without a parent is the root directory, which we 210 * can't remove. */ 211 if (!dir->parent) 212 return -EPERM; 213 214 ListRemove(&entry->next); 215 216 ListForEachEntry(entry,&dir->entries,next) 217 { 218 /* Remove. */ 219 // KePrint("Remove %s\n", entry->name); 220 } 221 222 return 0; 223 }
