Changeset c028b22 in mainline for uspace/srv/fs/fat/fat.c


Ignore:
Timestamp:
2011-07-08T17:01:01Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc1a727
Parents:
4e36219 (diff), 026793d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r4e36219 rc028b22  
    3939#include "fat.h"
    4040#include <ipc/services.h>
    41 #include <ipc/ns.h>
     41#include <ns.h>
    4242#include <async.h>
    4343#include <errno.h>
     
    7676 * request has been completed.
    7777 */
    78 static void fat_connection(ipc_callid_t iid, ipc_call_t *icall)
     78static void fat_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    7979{
    8080        if (iid) {
     
    8888       
    8989        dprintf(NAME ": connection opened\n");
    90         while (1) {
    91                 ipc_callid_t callid;
     90       
     91        while (true) {
    9292                ipc_call_t call;
    93        
    94                 callid = async_get_call(&call);
    95                 switch  (IPC_GET_IMETHOD(call)) {
    96                 case IPC_M_PHONE_HUNGUP:
     93                ipc_callid_t callid = async_get_call(&call);
     94               
     95                if (!IPC_GET_IMETHOD(call))
    9796                        return;
     97               
     98                switch (IPC_GET_IMETHOD(call)) {
    9899                case VFS_OUT_MOUNTED:
    99100                        fat_mounted(callid, &call);
     
    144145int main(int argc, char **argv)
    145146{
    146         int vfs_phone;
    147         int rc;
    148 
    149147        printf(NAME ": HelenOS FAT file system server\n");
    150 
    151         rc = fat_idx_init();
     148       
     149        int rc = fat_idx_init();
    152150        if (rc != EOK)
    153151                goto err;
    154 
    155         vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
    156         if (vfs_phone < EOK) {
     152       
     153        async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
     154            SERVICE_VFS, 0, 0);
     155        if (!vfs_sess) {
    157156                printf(NAME ": failed to connect to VFS\n");
    158157                return -1;
    159158        }
    160159       
    161         rc = fs_register(vfs_phone, &fat_reg, &fat_vfs_info, fat_connection);
     160        rc = fs_register(vfs_sess, &fat_reg, &fat_vfs_info, fat_connection);
    162161        if (rc != EOK) {
    163162                fat_idx_fini();
     
    168167        task_retval(0);
    169168        async_manager();
    170         /* not reached */
     169       
     170        /* Not reached */
    171171        return 0;
    172 
     172       
    173173err:
    174174        printf(NAME ": Failed to register file system (%d)\n", rc);
     
    178178/**
    179179 * @}
    180  */ 
     180 */
Note: See TracChangeset for help on using the changeset viewer.