Changeset 32f623d9 in mainline for uspace/srv/fs/fat/fat_directory.c
- Timestamp:
- 2011-09-24T20:49:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 40cdbec
- Parents:
- 5bf76c1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_directory.c
r5bf76c1 r32f623d9 262 262 { 263 263 int rc; 264 bool enable_lfn = true; /* TODO: make this a mount option */ 264 void *data; 265 fat_instance_t *instance; 266 267 rc = fs_instance_get(di->nodep->idx->service_id, &data); 268 assert(rc == EOK); 269 instance = (fat_instance_t *) data; 265 270 266 271 if (fat_valid_short_name(name)) { … … 277 282 rc = fat_directory_write_dentry(di, de); 278 283 return rc; 279 } else if ( enable_lfn&& fat_valid_name(name)) {284 } else if (instance->lfn_enabled && fat_valid_name(name)) { 280 285 /* We should create long entries to store name */ 281 286 int long_entry_count; … … 292 297 if (lfn_size % FAT_LFN_ENTRY_SIZE) 293 298 long_entry_count++; 294 rc = fat_directory_lookup_free(di, long_entry_count +1);299 rc = fat_directory_lookup_free(di, long_entry_count + 1); 295 300 if (rc != EOK) 296 301 return rc; … … 328 333 FAT_LFN_ORDER(d) |= FAT_LFN_LAST; 329 334 330 rc = fat_directory_seek(di, start_pos +long_entry_count);335 rc = fat_directory_seek(di, start_pos + long_entry_count); 331 336 return rc; 332 337 }
Note:
See TracChangeset
for help on using the changeset viewer.