Changeset b1b1891 in mainline
- Timestamp:
- 2013-07-25T11:36:01Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fadc76f
- Parents:
- b1cdc44a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
rb1cdc44a rb1b1891 650 650 int mkdir(const char *path, mode_t mode) 651 651 { 652 sysarg_t rc;653 aid_t req;654 655 652 size_t pa_size; 656 653 char *pa = absolutize(path, &pa_size); 657 if (!pa) 654 if (!pa) { 658 655 return ENOMEM; 659 660 async_exch_t *exch = vfs_exchange_begin(); 661 662 req = async_send_1(exch, VFS_IN_MKDIR, mode, NULL); 663 rc = async_data_write_start(exch, pa, pa_size); 664 if (rc != EOK) { 665 vfs_exchange_end(exch); 666 free(pa); 667 668 sysarg_t rc_orig; 669 async_wait_for(req, &rc_orig); 670 671 if (rc_orig == EOK) 672 return (int) rc; 673 else 674 return (int) rc_orig; 675 } 676 vfs_exchange_end(exch); 677 free(pa); 678 async_wait_for(req, &rc); 679 return rc; 656 } 657 658 int ret = _vfs_walk(-1, pa, WALK_MUST_CREATE | WALK_DIRECTORY); 659 if (ret < 0) { 660 return ret; 661 } 662 663 close(ret); 664 return EOK; 680 665 } 681 666
Note:
See TracChangeset
for help on using the changeset viewer.