Changes in uspace/lib/c/generic/vfs/vfs.c [73fbcbb:5930e3f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
r73fbcbb r5930e3f 893 893 } 894 894 895 int statfs(const char *path, struct statfs *st) 896 { 897 sysarg_t rc, rc_orig; 895 int statfs(const char *path, struct statfs *statfs) 896 { 897 sysarg_t rc; 898 sysarg_t rc_orig; 898 899 aid_t req; 899 900 size_t pa_size; 900 901 901 902 char *pa = absolutize(path, &pa_size); 902 903 if (!pa) 903 904 return ENOMEM; 904 905 async_exch_t *exch = vfs_exchange_begin(); 906 905 async_exch_t *exch = vfs_exchange_begin(); 906 907 907 req = async_send_0(exch, VFS_IN_STATFS, NULL); 908 908 rc = async_data_write_start(exch, pa, pa_size); 909 if (rc != EOK) 910 goto exit; 911 912 rc = async_data_read_start(exch, (void *) st, sizeof(*st)); 913 914 exit: 909 if (rc != EOK) { 910 vfs_exchange_end(exch); 911 free(pa); 912 async_wait_for(req, &rc_orig); 913 if (rc_orig == EOK) 914 return (int) rc; 915 else 916 return (int) rc_orig; 917 } 918 rc = async_data_read_start(exch, (void *) statfs, sizeof(struct statfs)); 919 if (rc != EOK) { 920 vfs_exchange_end(exch); 921 free(pa); 922 async_wait_for(req, &rc_orig); 923 if (rc_orig == EOK) 924 return (int) rc; 925 else 926 return (int) rc_orig; 927 } 915 928 vfs_exchange_end(exch); 916 929 free(pa); 917 async_wait_for(req, &rc _orig);918 return (int) (rc_orig != EOK ? rc_orig : rc);930 async_wait_for(req, &rc); 931 return rc; 919 932 } 920 933
Note:
See TracChangeset
for help on using the changeset viewer.