Ignore:
File:
1 edited

Legend:

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

    r9934f7d r5bd1ffb  
    4040#include "ext2fs.h"
    4141#include <ipc/services.h>
    42 #include <ns.h>
     42#include <ipc/ns.h>
    4343#include <async.h>
    4444#include <errno.h>
     
    7575 * request has been completed.
    7676 */
    77 static void ext2fs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
     77static void ext2fs_connection(ipc_callid_t iid, ipc_call_t *icall)
    7878{
    7979        if (iid) {
     
    8787       
    8888        dprintf(NAME ": connection opened\n");
    89         while (true) {
     89        while (1) {
     90                ipc_callid_t callid;
    9091                ipc_call_t call;
    91                 ipc_callid_t callid = async_get_call(&call);
    92                
    93                 if (!IPC_GET_IMETHOD(call))
     92       
     93                callid = async_get_call(&call);
     94                switch  (IPC_GET_IMETHOD(call)) {
     95                case IPC_M_PHONE_HUNGUP:
    9496                        return;
    95                
    96                 switch (IPC_GET_IMETHOD(call)) {
    9797                case VFS_OUT_MOUNTED:
    9898                        ext2fs_mounted(callid, &call);
     
    143143int main(int argc, char **argv)
    144144{
     145        int vfs_phone;
     146        int rc;
     147
    145148        printf(NAME ": HelenOS EXT2 file system server\n");
    146        
    147         async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
    148             SERVICE_VFS, 0, 0);
    149         if (!vfs_sess) {
     149
     150        vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
     151        if (vfs_phone < EOK) {
    150152                printf(NAME ": failed to connect to VFS\n");
    151153                return -1;
    152154        }
    153155
    154         int rc = ext2fs_global_init();
     156        rc = ext2fs_global_init();
    155157        if (rc != EOK) {
    156158                printf(NAME ": Failed global initialization\n");
     
    158160        }       
    159161               
    160         rc = fs_register(vfs_sess, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);
     162        rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);
    161163        if (rc != EOK) {
    162164                fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);
Note: See TracChangeset for help on using the changeset viewer.