Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_ops.c

    r951e451 r6371eb47  
    9090        errno_t rc;
    9191
     92        /* If the file descriptors are the same, do nothing. */
     93        if (oldfd == newfd)
     94                return EOK;
     95
    9296        /* Lookup the file structure corresponding to fd. */
    9397        vfs_file_t *oldfile = vfs_file_get(oldfd);
     
    96100
    97101        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         }
    104102
    105103        if (newfd != -1) {
     
    170168        res.triplet.fs_handle = fs_handle;
    171169        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));
    175173        res.type = VFS_NODE_DIRECTORY;
    176174
     
    376374        }
    377375
    378         *bytes = ipc_get_arg1(answer);
     376        *bytes = IPC_GET_ARG1(*answer);
    379377        return rc;
    380378}
     
    403401        async_wait_for(msg, &rc);
    404402
    405         chunk->size = ipc_get_arg1(answer);
     403        chunk->size = IPC_GET_ARG1(*answer);
    406404
    407405        return (errno_t) rc;
     
    490488                /* Update the cached version of node's size. */
    491489                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));
    494492                }
    495493                fibril_rwlock_write_unlock(&file->node->contents_rwlock);
     
    618616                return EBADF;
    619617
    620         if (!file->open_write || file->node->type != VFS_NODE_FILE) {
    621                 vfs_file_put(file);
    622                 return EINVAL;
    623         }
    624 
    625618        fibril_rwlock_write_lock(&file->node->contents_rwlock);
    626619
     
    644637
    645638        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);
    648641        vfs_exchange_release(exch);
    649642
     
    661654
    662655        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);
    665658        vfs_exchange_release(exch);
    666659
Note: See TracChangeset for help on using the changeset viewer.