Ignore:
File:
1 edited

Legend:

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

    r79ae36dd rffa2c8ef  
    4141#include <stdio.h>
    4242#include <ipc/services.h>
    43 #include <ns.h>
     43#include <ipc/ns.h>
    4444#include <async.h>
    4545#include <errno.h>
     
    6868                ipc_callid_t callid = async_get_call(&call);
    6969               
    70                 if (!IPC_GET_IMETHOD(call))
     70                switch  (IPC_GET_IMETHOD(call)) {
     71                case IPC_M_PHONE_HUNGUP:
    7172                        return;
    72                
    73                 switch (IPC_GET_IMETHOD(call)) {
    7473                case VFS_OUT_MOUNTED:
    7574                        devfs_mounted(callid, &call);
     
    120119int main(int argc, char *argv[])
    121120{
    122         printf("%s: HelenOS Device Filesystem\n", NAME);
     121        printf(NAME ": HelenOS Device Filesystem\n");
    123122       
    124123        if (!devfs_init()) {
    125                 printf("%s: failed to initialize devfs\n", NAME);
     124                printf(NAME ": failed to initialize devfs\n");
    126125                return -1;
    127126        }
    128127       
    129         async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
    130             SERVICE_VFS, 0, 0);
    131         if (!vfs_sess) {
    132                 printf("%s: Unable to connect to VFS\n", NAME);
     128        int vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
     129        if (vfs_phone < EOK) {
     130                printf(NAME ": Unable to connect to VFS\n");
    133131                return -1;
    134132        }
    135133       
    136         int rc = fs_register(vfs_sess, &devfs_reg, &devfs_vfs_info,
     134        int rc = fs_register(vfs_phone, &devfs_reg, &devfs_vfs_info,
    137135            devfs_connection);
    138136        if (rc != EOK) {
    139                 printf("%s: Failed to register file system (%d)\n", NAME, rc);
     137                printf(NAME ": Failed to register file system (%d)\n", rc);
    140138                return rc;
    141139        }
    142140       
    143         printf("%s: Accepting connections\n", NAME);
     141        printf(NAME ": Accepting connections\n");
    144142        task_retval(0);
    145143        async_manager();
Note: See TracChangeset for help on using the changeset viewer.