Changeset af0ff9b2 in mainline for uspace/srv/vfs/vfs_mount.c


Ignore:
Timestamp:
2007-09-28T22:15:02Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
07e4a3c
Parents:
2c2e0c6
Message:

VFS work.
Add the missing bits of VFS-side VFS_MOUNT.

File:
1 edited

Legend:

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

    r2c2e0c6 raf0ff9b2  
    194194        futex_up(&rootfs_futex);
    195195       
     196        free(buf);      /* The buffer is not needed anymore. */
     197       
    196198        /*
    197199         * At this point, we have all necessary pieces: file system and device
     
    199201         * of the file system being mounted.
    200202         */
    201        
     203
     204        int phone = vfs_grab_phone(mp.fs_handle);
     205        /* Later we can use ARG3 to pass mode/flags. */
     206        aid_t req1 = async_send_3(phone, VFS_MOUNT, (ipcarg_t) mp.dev_handle,
     207            (ipcarg_t) mp.index, 0, NULL);
     208        /* The second call uses the same method. */
     209        aid_t req2 = async_send_3(phone, VFS_MOUNT,
     210            (ipcarg_t) mounted_root.fs_handle,
     211            (ipcarg_t) mounted_root.dev_handle, (ipcarg_t) mounted_root.index,
     212            NULL);
     213
     214        ipcarg_t rc1;
     215        ipcarg_t rc2;
     216        async_wait_for(req1, &rc1);
     217        async_wait_for(req2, &rc2);
     218        vfs_release_phone(phone);
     219
     220        if ((rc1 == EOK) && (rc2 == EOK))
     221                ipc_answer_fast(rid, EOK, 0, 0);
     222        else if (rc1 != EOK)
     223                ipc_answer_fast(rid, rc1, 0, 0);
     224        else
     225                ipc_answer_fast(rid, rc2, 0, 0);
    202226}
    203227
Note: See TracChangeset for help on using the changeset viewer.