Changeset 39b0a51 in mainline for uspace/srv/fs/fat/fat_directory.c
- Timestamp:
- 2017-06-28T16:05:37Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ee50130
- Parents:
- 30eab78
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_directory.c
r30eab78 r39b0a51 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)) … … 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.