Ignore:
File:
1 edited

Legend:

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

    rdf908b3 r228e490  
    177177        ipc_call_t call;
    178178        ipc_callid_t callid = async_get_call(&call);
    179         if (IPC_GET_METHOD(call) != IPC_M_CONNECT_TO_ME) {
    180                 dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
     179        if (IPC_GET_IMETHOD(call) != IPC_M_CONNECT_TO_ME) {
     180                dprintf("Unexpected call, method = %d\n", IPC_GET_IMETHOD(call));
    181181                list_remove(&fs_info->fs_link);
    182182                fibril_mutex_unlock(&fs_head_lock);
     
    197197        size_t size;
    198198        if (!async_share_in_receive(&callid, &size)) {
    199                 dprintf("Unexpected call, method = %d\n", IPC_GET_METHOD(call));
     199                dprintf("Unexpected call, method = %d\n", IPC_GET_IMETHOD(call));
    200200                list_remove(&fs_info->fs_link);
    201201                fibril_mutex_unlock(&fs_head_lock);
     
    235235         */
    236236        fs_info->fs_handle = (fs_handle_t) atomic_postinc(&fs_handle_next);
    237         ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);
     237        ipc_answer_1(rid, EOK, (sysarg_t) fs_info->fs_handle);
    238238       
    239239        fibril_condvar_broadcast(&fs_head_cv);
     
    333333}
    334334
     335/** Find the VFS info structure.
     336 *
     337 * @param handle        FS handle for which the VFS info structure is sought.
     338 * @return              VFS info structure on success or NULL otherwise.
     339 */
     340vfs_info_t *fs_handle_to_info(fs_handle_t handle)
     341{
     342        vfs_info_t *info = NULL;
     343        link_t *cur;
     344
     345        fibril_mutex_lock(&fs_head_lock);
     346        for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
     347                fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link);
     348                if (fs->fs_handle == handle) {
     349                        info = &fs->vfs_info;
     350                        break;
     351                }
     352        }
     353        fibril_mutex_unlock(&fs_head_lock);
     354
     355        return info;
     356}
     357
    335358/**
    336359 * @}
Note: See TracChangeset for help on using the changeset viewer.