- Timestamp:
- Jul 16, 2015, 3:29:10 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_fat32/fat32.c
r617 r619 2043 2043 name , parent->name ); 2044 2044 #endif 2045 2046 // compute name lenth2047 unsigned int length = _strlen( name );2048 2045 2049 2046 // scan inodes in the parent directory 2050 2047 for ( current = parent->child ; current ; current = current->next ) 2051 2048 { 2052 if ( _str ncmp( name , current->name , length ) == 0 )2049 if ( _strcmp( name , current->name ) == 0 ) 2053 2050 { 2054 2051 … … 2153 2150 2154 2151 // test if extracted name == searched name 2155 if ( _str ncmp( name , cname , length) == 0 )2152 if ( _strcmp( name , cname ) == 0 ) 2156 2153 { 2157 2154 cluster = (_read_entry( DIR_FST_CLUS_HI , buffer + offset , 1 ) << 16) | … … 2223 2220 2224 2221 // handle root directory case 2225 if ( _str ncmp( pathname , "/" , 2) == 0 )2222 if ( _strcmp( pathname , "/" ) == 0 ) 2226 2223 { 2227 2224 … … 2259 2256 #endif 2260 2257 2261 if ( _str ncmp( name, "..", _strlen( name ) + 1) == 0)2258 if ( _strcmp( name, ".." ) == 0) 2262 2259 { 2263 2260 // found special name "..", try to go up … … 2268 2265 child = parent; 2269 2266 } 2270 else if ( _str ncmp( name, ".", _strlen( name ) + 1) == 0 )2267 else if ( _strcmp( name, "." ) == 0 ) 2271 2268 { 2272 2269 // found special name ".", stay on the same level … … 2412 2409 char cname[32]; // buffer for a full name in a directory entry 2413 2410 unsigned int nb_read; // number of characters analysed in path 2414 unsigned int length; // searched name length2415 2411 unsigned int parent_cluster; // cluster index for the parent directory 2416 2412 unsigned int child_cluster = 0; // cluster index for the searched file/dir … … 2445 2441 #endif 2446 2442 found = 0; 2447 length = _strlen( name );2448 2443 2449 2444 // scan clusters containing the parent directory … … 2520 2515 2521 2516 // test if extracted name == searched name 2522 if ( _str ncmp( name , cname , length) == 0 )2517 if ( _strcmp( name , cname ) == 0 ) 2523 2518 { 2524 2519 child_cluster = (_read_entry( DIR_FST_CLUS_HI , buf , 1 ) << 16) |
Note: See TracChangeset
for help on using the changeset viewer.