- Timestamp:
- Jul 16, 2015, 3:29:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_fat32/fat32.c
r616 r617 2243 2243 parent = _fat.inode_tree_root; // Inode-Tree root 2244 2244 2245 while ( last == 0)2245 while ( !last ) 2246 2246 { 2247 2247 // get searched file/dir name … … 2259 2259 #endif 2260 2260 2261 // get child inode from parent directory 2262 code = _get_child_from_parent( parent, 2263 name, 2264 &child ); 2265 2266 // we need to find the child inode for all non terminal names 2267 if ( (code == 2) || ((code == 1 ) && (last == 0)) ) 2268 { 2269 2270 #if (GIET_DEBUG_FAT & 1) 2271 if ( _get_proctime() > GIET_DEBUG_FAT ) 2272 _printf("\n[DEBUG FAT] _get_inode_from_path() : neither parent, nor child found for <%s>\n", 2273 pathname ); 2274 #endif 2275 return 2; // error : parent inode not found 2276 } 2277 2261 if ( _strncmp( name, "..", _strlen( name ) + 1 ) == 0) 2262 { 2263 // found special name "..", try to go up 2264 code = 0; 2265 if ( parent->parent ) 2266 child = parent->parent; 2267 else 2268 child = parent; 2269 } 2270 else if ( _strncmp( name, ".", _strlen( name ) + 1 ) == 0 ) 2271 { 2272 // found special name ".", stay on the same level 2273 code = 0; 2274 child = parent; 2275 } 2276 else 2277 { 2278 // get child inode from parent directory 2279 code = _get_child_from_parent( parent, 2280 name, 2281 &child ); 2282 2283 // we need to find the child inode for all non terminal names 2284 if ( (code == 2) || ((code == 1 ) && !last) ) 2285 { 2286 2287 #if (GIET_DEBUG_FAT & 1) 2288 if ( _get_proctime() > GIET_DEBUG_FAT ) 2289 _printf("\n[DEBUG FAT] _get_inode_from_path() : neither parent, nor child found for <%s>\n", 2290 pathname ); 2291 #endif 2292 return 2; // error : parent inode not found 2293 } 2294 } 2295 2278 2296 // update parent if not the last iteration 2279 if ( last == 0 ) parent = child;2280 2297 if ( !last ) 2298 parent = child; 2281 2299 } // end while 2282 2300
Note: See TracChangeset
for help on using the changeset viewer.