Changeset 8dc72b64 in mainline for uspace/srv/vfs/vfs.c


Ignore:
Timestamp:
2009-03-02T17:37:19Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
16da5f8e
Parents:
6519d6f
Message:

support for pending (blocking) mounts (waiting for the presence of the filesystem implementation)
the mount point and filesystem type arguments of VFS_MOUNT were swapped, the IPC_M_PING was eliminated
small cleanups

File:
1 edited

Legend:

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

    r6519d6f r8dc72b64  
    2929/** @addtogroup fs
    3030 * @{
    31  */ 
     31 */
    3232
    3333/**
    34  * @file        vfs.c
    35  * @brief       VFS service for HelenOS.
     34 * @file vfs.c
     35 * @brief VFS service for HelenOS.
    3636 */
    3737
     
    5252static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall)
    5353{
    54         bool keep_on_going = 1;
    55 
     54        bool keep_on_going = true;
     55       
    5656        /*
    5757         * The connection was opened via the IPC_CONNECT_ME_TO call.
     
    5959         */
    6060        ipc_answer_0(iid, EOK);
    61 
     61       
    6262        /*
    6363         * Here we enter the main connection fibril loop.
     
    7171         */
    7272        while (keep_on_going) {
    73                 ipc_callid_t callid;
    7473                ipc_call_t call;
     74                ipc_callid_t callid = async_get_call(&call);
     75               
     76                fs_handle_t fs_handle;
    7577                int phone;
    76                 fs_handle_t fs_handle;
    77 
    78                 callid = async_get_call(&call);
    79 
     78               
    8079                switch (IPC_GET_METHOD(call)) {
    8180                case IPC_M_PHONE_HUNGUP:
     
    140139                }
    141140        }
    142 
     141       
    143142        /* TODO: cleanup after the client */
    144        
    145143}
    146144
    147145int main(int argc, char **argv)
    148146{
    149         ipcarg_t phonead;
    150 
    151147        printf(NAME ": HelenOS VFS server\n");
    152 
     148       
    153149        /*
    154150         * Initialize the list of registered file systems.
    155151         */
    156152        list_initialize(&fs_head);
    157 
     153       
    158154        /*
    159155         * Initialize VFS node hash table.
     
    163159                return ENOMEM;
    164160        }
    165 
     161       
    166162        /*
    167163         * Allocate and initialize the Path Lookup Buffer.
     
    173169                return ENOMEM;
    174170        }
     171       
    175172        if (as_area_create(plb, PLB_SIZE, AS_AREA_READ | AS_AREA_WRITE |
    176173            AS_AREA_CACHEABLE) != plb) {
     
    184181         */
    185182        async_set_client_connection(vfs_connection);
    186 
     183       
    187184        /*
    188185         * Register at the naming service.
    189186         */
     187        ipcarg_t phonead;
    190188        ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, &phonead);
    191 
     189       
    192190        /*
    193191         * Start accepting connections.
     
    200198/**
    201199 * @}
    202  */ 
     200 */
Note: See TracChangeset for help on using the changeset viewer.