Changes in uspace/lib/fs/libfs.c [39330200:4f30222] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fs/libfs.c
r39330200 r4f30222 84 84 { 85 85 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 86 errno_t rc;86 int rc; 87 87 vfs_fs_probe_info_t info; 88 88 … … 112 112 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 113 113 char *opts; 114 errno_t rc;114 int rc; 115 115 116 116 /* Accept the mount options. */ … … 136 136 { 137 137 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 138 errno_t rc;138 int rc; 139 139 140 140 rc = vfs_out_ops->unmounted(service_id); … … 160 160 IPC_GET_ARG4(*req)); 161 161 size_t rbytes; 162 errno_t rc;162 int rc; 163 163 164 164 rc = vfs_out_ops->read(service_id, index, pos, &rbytes); … … 178 178 size_t wbytes; 179 179 aoff64_t nsize; 180 errno_t rc;180 int rc; 181 181 182 182 rc = vfs_out_ops->write(service_id, index, pos, &wbytes, &nsize); … … 195 195 aoff64_t size = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*req), 196 196 IPC_GET_ARG4(*req)); 197 errno_t rc;197 int rc; 198 198 199 199 rc = vfs_out_ops->truncate(service_id, index, size); … … 206 206 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 207 207 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req); 208 errno_t rc;208 int rc; 209 209 210 210 rc = vfs_out_ops->close(service_id, index); … … 218 218 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req); 219 219 220 errno_t rc;220 int rc; 221 221 fs_node_t *node = NULL; 222 222 rc = libfs_ops->node_get(&node, service_id, index); … … 244 244 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 245 245 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req); 246 errno_t rc;246 int rc; 247 247 248 248 rc = vfs_out_ops->sync(service_id, index); … … 260 260 service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req); 261 261 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req); 262 errno_t rc;262 int rc; 263 263 264 264 fs_node_t *node = NULL; … … 364 364 * 365 365 */ 366 errno_t fs_register(async_sess_t *sess, vfs_info_t *info, vfs_out_ops_t *vops,366 int fs_register(async_sess_t *sess, vfs_info_t *info, vfs_out_ops_t *vops, 367 367 libfs_ops_t *lops) 368 368 { … … 381 381 * Send our VFS info structure to VFS. 382 382 */ 383 errno_t rc = async_data_write_start(exch, info, sizeof(*info));383 int rc = async_data_write_start(exch, info, sizeof(*info)); 384 384 385 385 if (rc != EOK) { … … 446 446 } 447 447 448 static errno_t plb_get_component(char *dest, unsigned *sz, unsigned *ppos,448 static int plb_get_component(char *dest, unsigned *sz, unsigned *ppos, 449 449 unsigned last) 450 450 { … … 476 476 } 477 477 478 static errno_t receive_fname(char *buffer)478 static int receive_fname(char *buffer) 479 479 { 480 480 size_t size; … … 500 500 501 501 char component[NAME_MAX + 1]; 502 errno_t rc = receive_fname(component);502 int rc = receive_fname(component); 503 503 if (rc != EOK) { 504 504 async_answer_0(rid, rc); … … 555 555 556 556 char component[NAME_MAX + 1]; 557 errno_t rc;557 int rc; 558 558 559 559 fs_node_t *par = NULL; … … 656 656 if (rc == EOK) { 657 657 aoff64_t size = ops->size_get(cur); 658 async_answer_5(rid, EOK, fs_handle,658 async_answer_5(rid, fs_handle, service_id, 659 659 ops->index_get(cur), 660 660 (ops->is_directory(cur) << 16) | last, … … 699 699 out1: 700 700 if (!cur) { 701 async_answer_5(rid, EOK, fs_handle, ops->index_get(par),701 async_answer_5(rid, fs_handle, service_id, ops->index_get(par), 702 702 (ops->is_directory(par) << 16) | last_next, 703 703 LOWER32(ops->size_get(par)), UPPER32(ops->size_get(par))); … … 705 705 } 706 706 707 async_answer_5(rid, EOK, fs_handle, ops->index_get(cur),707 async_answer_5(rid, fs_handle, service_id, ops->index_get(cur), 708 708 (ops->is_directory(cur) << 16) | last, LOWER32(ops->size_get(cur)), 709 709 UPPER32(ops->size_get(cur))); … … 727 727 728 728 fs_node_t *fn; 729 errno_t rc = ops->node_get(&fn, service_id, index);729 int rc = ops->node_get(&fn, service_id, index); 730 730 on_error(rc, answer_and_return(rid, rc)); 731 731 … … 733 733 size_t size; 734 734 if ((!async_data_read_receive(&callid, &size)) || 735 (size != sizeof( vfs_stat_t))) {735 (size != sizeof(struct stat))) { 736 736 ops->node_put(fn); 737 737 async_answer_0(callid, EINVAL); … … 740 740 } 741 741 742 vfs_stat_t stat;743 memset(&stat, 0, sizeof( vfs_stat_t));742 struct stat stat; 743 memset(&stat, 0, sizeof(struct stat)); 744 744 745 745 stat.fs_handle = fs_handle; … … 755 755 756 756 757 async_data_read_finalize(callid, &stat, sizeof( vfs_stat_t));757 async_data_read_finalize(callid, &stat, sizeof(struct stat)); 758 758 async_answer_0(rid, EOK); 759 759 } … … 766 766 767 767 fs_node_t *fn; 768 errno_t rc = ops->node_get(&fn, service_id, index);768 int rc = ops->node_get(&fn, service_id, index); 769 769 on_error(rc, answer_and_return(rid, rc)); 770 770 … … 772 772 size_t size; 773 773 if ((!async_data_read_receive(&callid, &size)) || 774 (size != sizeof( vfs_statfs_t))) {774 (size != sizeof(struct statfs))) { 775 775 goto error; 776 776 } 777 777 778 vfs_statfs_tst;779 memset(&st, 0, sizeof( vfs_statfs_t));778 struct statfs st; 779 memset(&st, 0, sizeof(struct statfs)); 780 780 781 781 str_cpy(st.fs_name, sizeof(st.fs_name), fs_name); … … 800 800 801 801 ops->node_put(fn); 802 async_data_read_finalize(callid, &st, sizeof( vfs_statfs_t));802 async_data_read_finalize(callid, &st, sizeof(struct statfs)); 803 803 async_answer_0(rid, EOK); 804 804 return; … … 826 826 827 827 fs_node_t *fn; 828 errno_t rc = ops->node_get(&fn, service_id, index);828 int rc = ops->node_get(&fn, service_id, index); 829 829 on_error(rc, answer_and_return(rid, rc)); 830 830 … … 853 853 } fs_instance_t; 854 854 855 errno_t fs_instance_create(service_id_t service_id, void *data)855 int fs_instance_create(service_id_t service_id, void *data) 856 856 { 857 857 fs_instance_t *inst = malloc(sizeof(fs_instance_t)); … … 884 884 } 885 885 886 errno_t fs_instance_get(service_id_t service_id, void **idp)886 int fs_instance_get(service_id_t service_id, void **idp) 887 887 { 888 888 fibril_mutex_lock(&instances_mutex); … … 898 898 } 899 899 900 errno_t fs_instance_destroy(service_id_t service_id)900 int fs_instance_destroy(service_id_t service_id) 901 901 { 902 902 fibril_mutex_lock(&instances_mutex);
Note:
See TracChangeset
for help on using the changeset viewer.