Ignore:
File:
1 edited

Legend:

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

    rffa2c8ef r852b801  
    3838
    3939#include "fat.h"
     40#include <ipc/ipc.h>
    4041#include <ipc/services.h>
    41 #include <ipc/ns.h>
    4242#include <async.h>
    4343#include <errno.h>
    4444#include <unistd.h>
    45 #include <task.h>
    4645#include <stdio.h>
    4746#include <libfs.h>
    4847#include "../../vfs/vfs.h"
    4948
    50 #define NAME    "fat"
    5149
    5250vfs_info_t fat_vfs_info = {
    53         .name = NAME,
    54         .concurrent_read_write = false,
    55         .write_retains_size = false,   
     51        .name = "fat",
    5652};
    5753
     
    8480                 * created by IPC_M_CONNECT_TO_ME.
    8581                 */
    86                 async_answer_0(iid, EOK);
     82                ipc_answer_0(iid, EOK);
    8783        }
    8884       
    89         dprintf(NAME ": connection opened\n");
     85        dprintf("VFS-FAT connection established.\n");
    9086        while (1) {
    9187                ipc_callid_t callid;
     
    9389       
    9490                callid = async_get_call(&call);
    95                 switch  (IPC_GET_IMETHOD(call)) {
     91                switch  (IPC_GET_METHOD(call)) {
    9692                case IPC_M_PHONE_HUNGUP:
    9793                        return;
     
    10197                case VFS_OUT_MOUNT:
    10298                        fat_mount(callid, &call);
    103                         break;
    104                 case VFS_OUT_UNMOUNTED:
    105                         fat_unmounted(callid, &call);
    106                         break;
    107                 case VFS_OUT_UNMOUNT:
    108                         fat_unmount(callid, &call);
    10999                        break;
    110100                case VFS_OUT_LOOKUP:
     
    136126                        break;
    137127                default:
    138                         async_answer_0(callid, ENOTSUP);
     128                        ipc_answer_0(callid, ENOTSUP);
    139129                        break;
    140130                }
     
    147137        int rc;
    148138
    149         printf(NAME ": HelenOS FAT file system server\n");
     139        printf("fat: HelenOS FAT file system server.\n");
    150140
    151141        rc = fat_idx_init();
     
    153143                goto err;
    154144
    155         vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
     145        vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0);
    156146        if (vfs_phone < EOK) {
    157                 printf(NAME ": failed to connect to VFS\n");
     147                printf("fat: failed to connect to VFS\n");
    158148                return -1;
    159149        }
     
    165155        }
    166156       
    167         printf(NAME ": Accepting connections\n");
    168         task_retval(0);
     157        dprintf("FAT filesystem registered, fs_handle=%d.\n",
     158            fat_reg.fs_handle);
     159
    169160        async_manager();
    170161        /* not reached */
     
    172163
    173164err:
    174         printf(NAME ": Failed to register file system (%d)\n", rc);
     165        printf("Failed to register the FAT file system (%d)\n", rc);
    175166        return rc;
    176167}
Note: See TracChangeset for help on using the changeset viewer.