Changes in uspace/srv/vfs/vfs_ops.c [951e451:6371eb47] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r951e451 r6371eb47 90 90 errno_t rc; 91 91 92 /* If the file descriptors are the same, do nothing. */ 93 if (oldfd == newfd) 94 return EOK; 95 92 96 /* Lookup the file structure corresponding to fd. */ 93 97 vfs_file_t *oldfile = vfs_file_get(oldfd); … … 96 100 97 101 assert(oldfile->node != NULL); 98 99 /* If the file descriptors are the same, do nothing. */100 if (oldfd == newfd) {101 vfs_file_put(oldfile);102 return EOK;103 }104 102 105 103 if (newfd != -1) { … … 170 168 res.triplet.fs_handle = fs_handle; 171 169 res.triplet.service_id = service_id; 172 res.triplet.index = (fs_index_t) ipc_get_arg1(&answer);173 res.size = (int64_t) MERGE_LOUP32( ipc_get_arg2(&answer),174 ipc_get_arg3(&answer));170 res.triplet.index = (fs_index_t) IPC_GET_ARG1(answer); 171 res.size = (int64_t) MERGE_LOUP32(IPC_GET_ARG2(answer), 172 IPC_GET_ARG3(answer)); 175 173 res.type = VFS_NODE_DIRECTORY; 176 174 … … 376 374 } 377 375 378 *bytes = ipc_get_arg1(answer);376 *bytes = IPC_GET_ARG1(*answer); 379 377 return rc; 380 378 } … … 403 401 async_wait_for(msg, &rc); 404 402 405 chunk->size = ipc_get_arg1(answer);403 chunk->size = IPC_GET_ARG1(*answer); 406 404 407 405 return (errno_t) rc; … … 490 488 /* Update the cached version of node's size. */ 491 489 if (rc == EOK) { 492 file->node->size = MERGE_LOUP32( ipc_get_arg2(&answer),493 ipc_get_arg3(&answer));490 file->node->size = MERGE_LOUP32(IPC_GET_ARG2(answer), 491 IPC_GET_ARG3(answer)); 494 492 } 495 493 fibril_rwlock_write_unlock(&file->node->contents_rwlock); … … 618 616 return EBADF; 619 617 620 if (!file->open_write || file->node->type != VFS_NODE_FILE) {621 vfs_file_put(file);622 return EINVAL;623 }624 625 618 fibril_rwlock_write_lock(&file->node->contents_rwlock); 626 619 … … 644 637 645 638 async_exch_t *exch = vfs_exchange_grab(node->fs_handle); 646 errno_t rc = async_data_read_forward_ 3_0(exch, VFS_OUT_STAT,647 node->service_id, node->index, true );639 errno_t rc = async_data_read_forward_fast(exch, VFS_OUT_STAT, 640 node->service_id, node->index, true, 0, NULL); 648 641 vfs_exchange_release(exch); 649 642 … … 661 654 662 655 async_exch_t *exch = vfs_exchange_grab(node->fs_handle); 663 errno_t rc = async_data_read_forward_ 3_0(exch, VFS_OUT_STATFS,664 node->service_id, node->index, false );656 errno_t rc = async_data_read_forward_fast(exch, VFS_OUT_STATFS, 657 node->service_id, node->index, false, 0, NULL); 665 658 vfs_exchange_release(exch); 666 659
Note:
See TracChangeset
for help on using the changeset viewer.