Changeset 95c675b in mainline for uspace/srv/fs/fat/fat_directory.c
- Timestamp:
- 2017-10-17T13:11:35Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 60af4cdb
- Parents:
- dbf32b1 (diff), a416d070 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_directory.c
rdbf32b1 r95c675b 223 223 *de = d; 224 224 return EOK; 225 default:226 225 case FAT_DENTRY_SKIP: 227 226 case FAT_DENTRY_FREE: 227 case FAT_DENTRY_VOLLABEL: 228 default: 228 229 long_entry_count = 0; 229 230 long_entry = false; … … 252 253 while (!flag && fat_directory_prev(di) == EOK) { 253 254 if (fat_directory_get(di, &d) == EOK && 254 fat_classify_dentry(d) == FAT_DENTRY_LFN && 255 fat_classify_dentry(d) == FAT_DENTRY_LFN && 255 256 checksum == FAT_LFN_CHKSUM(d)) { 256 257 if (FAT_IS_LFN(d)) … … 300 301 return rc; 301 302 302 lfn_size = utf16_ length(wname);303 lfn_size = utf16_wsize(wname); 303 304 long_entry_count = lfn_size / FAT_LFN_ENTRY_SIZE; 304 305 if (lfn_size % FAT_LFN_ENTRY_SIZE) … … 473 474 case FAT_DENTRY_LFN: 474 475 case FAT_DENTRY_SKIP: 476 case FAT_DENTRY_VOLLABEL: 475 477 default: 476 478 found = 0; … … 523 525 case FAT_DENTRY_LFN: 524 526 case FAT_DENTRY_SKIP: 527 case FAT_DENTRY_VOLLABEL: 525 528 case FAT_DENTRY_FREE: 526 529 break; 527 530 } 528 } while (fat_directory_next(di) == EOK); 531 } while (fat_directory_next(di) == EOK); 529 532 530 533 return false; 534 } 535 536 /** Find volume label entry in a directory. 537 * 538 * @return EOK on success, ENOENT if not found, EIO on I/O error 539 */ 540 int fat_directory_vollabel_get(fat_directory_t *di, char *label) 541 { 542 fat_dentry_t *d; 543 int rc; 544 545 fat_directory_seek(di, 0); 546 do { 547 rc = fat_directory_get(di, &d); 548 if (rc != EOK) 549 return EIO; 550 551 switch (fat_classify_dentry(d)) { 552 case FAT_DENTRY_VOLLABEL: 553 fat_dentry_vollabel_get(d, label); 554 return EOK; 555 default: 556 break; 557 } 558 } while (fat_directory_next(di) == EOK); 559 560 /* Not found */ 561 return ENOENT; 531 562 } 532 563
Note:
See TracChangeset
for help on using the changeset viewer.