Changeset 5f4cfb1e in mainline for uspace/srv/fs


Ignore:
Timestamp:
2007-09-28T10:36:31Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
13125d3
Parents:
566d798d
Message:

VFS work.
Upon FS registration via VFS_REGISTER, the client is assigned a unique file
system handle. When generating the VFS_LOOKUP request in VFS, we also need to
pass the device handle. Add function to transform file system handle to phone.
Implement basic multi-call VFS request serialization on VFS side.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat.c

    r566d798d r5f4cfb1e  
    4343#include <unistd.h>
    4444#include <stdio.h>
    45 #include <as.h>>
     45#include <as.h>
    4646#include "../../vfs/vfs.h"
    4747
     
    6565
    6666uint8_t *plb_ro = NULL;
     67
     68int fs_handle = 0;
    6769
    6870/**
     
    156158         * Request sharing the Path Lookup Buffer with VFS.
    157159         */
    158         rc = ipc_call_sync_3(vfs_phone, IPC_M_AS_AREA_RECV, plb_ro, PLB_SIZE, 0,
    159             NULL, NULL, NULL);
     160        rc = ipc_call_sync_3(vfs_phone, IPC_M_AS_AREA_RECV, (ipcarg_t) plb_ro,
     161            PLB_SIZE, 0, NULL, NULL, NULL);
    160162        if (rc) {
    161163                async_wait_for(req, NULL);
     
    164166         
    165167        /*
     168         * Pick up the answer for the request to the VFS_REQUEST call.
     169         */
     170        async_wait_for(req, NULL);
     171        fs_handle = (int) IPC_GET_ARG1(answer);
     172        dprintf("FAT filesystem registered, fs_handle=%d.\n", fs_handle);
     173
     174        /*
    166175         * Create a connection fibril to handle the callback connection.
    167176         */
     
    173182         */
    174183        async_set_client_connection(fat_connection);
    175 
    176         /*
    177          * Pick up the answer for the request to the VFS_REQUEST call.
    178          */
    179         async_wait_for(req, NULL);
    180         dprintf("FAT filesystem registered.\n");
    181184
    182185        async_create_manager();
Note: See TracChangeset for help on using the changeset viewer.