Changeset ad67aa1 in mainline
- Timestamp:
- 2017-03-18T15:46:04Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b7f69f2
- Parents:
- 38aaf005
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
r38aaf005 rad67aa1 65 65 } while (0) 66 66 67 #define DPRINTF(...)68 69 #define LOG_EXIT(rc) \70 DPRINTF("Exiting %s() with rc = %d at line %d\n", __FUNC__, rc, __LINE__);71 72 67 static fs_reg_t reg; 73 68 … … 555 550 assert((int) index != -1); 556 551 557 DPRINTF("Entered libfs_lookup()\n");558 559 552 // TODO: Validate flags. 560 553 … … 573 566 if (rc != EOK) { 574 567 async_answer_0(rid, rc); 575 LOG_EXIT(rc);576 568 goto out; 577 569 } … … 591 583 if (!ops->is_directory(cur)) { 592 584 async_answer_0(rid, ENOTDIR); 593 LOG_EXIT(ENOTDIR);594 585 goto out; 595 586 } … … 601 592 if (rc != EOK) { 602 593 async_answer_0(rid, rc); 603 LOG_EXIT(rc);604 594 goto out; 605 595 } … … 616 606 if (rc != EOK) { 617 607 async_answer_0(rid, rc); 618 LOG_EXIT(rc);619 608 goto out; 620 609 } … … 625 614 if (rc != EOK) { 626 615 async_answer_0(rid, rc); 627 LOG_EXIT(rc);628 616 goto out; 629 617 } … … 646 634 if (cur && (lflag & L_FILE) && (ops->is_directory(cur))) { 647 635 async_answer_0(rid, EISDIR); 648 LOG_EXIT(EISDIR);649 636 goto out; 650 637 } … … 652 639 if (cur && (lflag & L_DIRECTORY) && (ops->is_file(cur))) { 653 640 async_answer_0(rid, ENOTDIR); 654 LOG_EXIT(ENOTDIR);655 641 goto out; 656 642 } … … 661 647 if (!cur) { 662 648 async_answer_0(rid, ENOENT); 663 LOG_EXIT(ENOENT);664 649 goto out; 665 650 } 666 651 if (!par) { 667 652 async_answer_0(rid, EINVAL); 668 LOG_EXIT(EINVAL);669 653 goto out; 670 654 } … … 681 665 ops->index_get(cur), last, lsize, 682 666 ops->is_directory(cur)); 683 LOG_EXIT(EOK);684 667 } else { 685 668 async_answer_0(rid, rc); 686 LOG_EXIT(rc);687 669 } 688 670 goto out; … … 694 676 if (cur && (lflag & L_EXCLUSIVE)) { 695 677 async_answer_0(rid, EEXIST); 696 LOG_EXIT(EEXIST);697 678 goto out; 698 679 } … … 702 683 if (rc != EOK) { 703 684 async_answer_0(rid, rc); 704 LOG_EXIT(rc);705 685 goto out; 706 686 } 707 687 if (!cur) { 708 688 async_answer_0(rid, ENOSPC); 709 LOG_EXIT(ENOSPC);710 689 goto out; 711 690 } … … 716 695 cur = NULL; 717 696 async_answer_0(rid, rc); 718 LOG_EXIT(rc);719 697 goto out; 720 698 } … … 726 704 if (!cur) { 727 705 async_answer_5(rid, fs_handle, service_id, 728 ops->index_get(par), last_next, -1, true); 729 LOG_EXIT(EOK); 706 ops->index_get(par), last_next, -1, true); 730 707 goto out; 731 708 } … … 735 712 if (rc != EOK) { 736 713 async_answer_0(rid, rc); 737 LOG_EXIT(rc);738 714 goto out; 739 715 } … … 749 725 lsize, ops->is_directory(cur)); 750 726 751 LOG_EXIT(EOK);752 727 out: 753 728 if (par) {
Note:
See TracChangeset
for help on using the changeset viewer.