Ignore:
File:
1 edited

Legend:

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

    r5bd1ffb r9934f7d  
    4040#include "ext2fs.h"
    4141#include <ipc/services.h>
    42 #include <ipc/ns.h>
     42#include <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)
     77static void ext2fs_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    7878{
    7979        if (iid) {
     
    8787       
    8888        dprintf(NAME ": connection opened\n");
    89         while (1) {
    90                 ipc_callid_t callid;
     89        while (true) {
    9190                ipc_call_t call;
    92        
    93                 callid = async_get_call(&call);
    94                 switch  (IPC_GET_IMETHOD(call)) {
    95                 case IPC_M_PHONE_HUNGUP:
     91                ipc_callid_t callid = async_get_call(&call);
     92               
     93                if (!IPC_GET_IMETHOD(call))
    9694                        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 
    148145        printf(NAME ": HelenOS EXT2 file system server\n");
    149 
    150         vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
    151         if (vfs_phone < EOK) {
     146       
     147        async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
     148            SERVICE_VFS, 0, 0);
     149        if (!vfs_sess) {
    152150                printf(NAME ": failed to connect to VFS\n");
    153151                return -1;
    154152        }
    155153
    156         rc = ext2fs_global_init();
     154        int rc = ext2fs_global_init();
    157155        if (rc != EOK) {
    158156                printf(NAME ": Failed global initialization\n");
     
    160158        }       
    161159               
    162         rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);
     160        rc = fs_register(vfs_sess, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);
    163161        if (rc != EOK) {
    164162                fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);
Note: See TracChangeset for help on using the changeset viewer.