Changes in uspace/srv/vfs/vfs_ops.c [951e451:4f13e19] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r951e451 r4f13e19 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); … … 617 615 if (!file) 618 616 return EBADF; 619 620 if (!file->open_write || file->node->type != VFS_NODE_FILE) {621 vfs_file_put(file);622 return EINVAL;623 }624 617 625 618 fibril_rwlock_write_lock(&file->node->contents_rwlock);
Note:
See TracChangeset
for help on using the changeset viewer.