Changeset ce7311fc in mainline


Ignore:
Timestamp:
2008-05-18T20:20:47Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
64b67c3
Parents:
e811bde
Message:

Cram VFS_MOUNT into one message. This creates a hidden demand for the sixth IPC
argument as there might be a desire to pass some options/flags in the future.

File:
1 edited

Legend:

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

    re811bde rce7311fc  
    8585        dev_handle_t dev_handle;
    8686        vfs_node_t *mp_node = NULL;
     87        int rc;
    8788
    8889        /*
     
    168169         * that we can track how many times it has been mounted.
    169170         */
    170         int rc;
    171171        vfs_lookup_res_t mr_res;
    172172        rc = lookup_root(fs_handle, dev_handle, &mr_res);
     
    254254         */
    255255
     256        /**
     257         * @todo
     258         * Add more IPC parameters so that we can send mount mode/flags.
     259         */
    256260        int phone = vfs_grab_phone(mp_res.triplet.fs_handle);
    257         /* Later we can use ARG3 to pass mode/flags. */
    258         aid_t req1 = async_send_3(phone, VFS_MOUNT,
     261        rc = async_req_5_0(phone, VFS_MOUNT,
    259262            (ipcarg_t) mp_res.triplet.dev_handle,
    260             (ipcarg_t) mp_res.triplet.index, 0, NULL);
    261         /* The second call uses the same method. */
    262         aid_t req2 = async_send_3(phone, VFS_MOUNT,
     263            (ipcarg_t) mp_res.triplet.index,
    263264            (ipcarg_t) mr_res.triplet.fs_handle,
    264265            (ipcarg_t) mr_res.triplet.dev_handle,
    265             (ipcarg_t) mr_res.triplet.index, NULL);
     266            (ipcarg_t) mr_res.triplet.index);
    266267        vfs_release_phone(phone);
    267268
    268         ipcarg_t rc1;
    269         ipcarg_t rc2;
    270         async_wait_for(req1, &rc1);
    271         async_wait_for(req2, &rc2);
    272 
    273         if ((rc1 != EOK) || (rc2 != EOK)) {
     269        if (rc != EOK) {
    274270                /* Mount failed, drop references to mr_node and mp_node. */
    275271                vfs_node_put(mr_node);
     
    278274        }
    279275       
    280         if (rc2 == EOK)
    281                 ipc_answer_0(rid, rc1);
    282         else if (rc1 == EOK)
    283                 ipc_answer_0(rid, rc2);
    284         else
    285                 ipc_answer_0(rid, rc1);
     276        ipc_answer_0(rid, rc);
    286277}
    287278
Note: See TracChangeset for help on using the changeset viewer.