Changeset 41811af in mainline for uspace/srv/fs/devfs/devfs.c


Ignore:
Timestamp:
2011-06-10T10:14:26Z (14 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab547063
Parents:
9536e6e (diff), 390d80d (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

File:
1 edited

Legend:

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

    r9536e6e r41811af  
    4141#include <stdio.h>
    4242#include <ipc/services.h>
    43 #include <ipc/ns.h>
     43#include <ns.h>
    4444#include <async.h>
    4545#include <errno.h>
     
    6868                ipc_callid_t callid = async_get_call(&call);
    6969               
    70                 switch  (IPC_GET_IMETHOD(call)) {
    71                 case IPC_M_PHONE_HUNGUP:
     70                if (!IPC_GET_IMETHOD(call))
    7271                        return;
     72               
     73                switch (IPC_GET_IMETHOD(call)) {
    7374                case VFS_OUT_MOUNTED:
    7475                        devfs_mounted(callid, &call);
     
    119120int main(int argc, char *argv[])
    120121{
    121         printf(NAME ": HelenOS Device Filesystem\n");
     122        printf("%s: HelenOS Device Filesystem\n", NAME);
    122123       
    123124        if (!devfs_init()) {
    124                 printf(NAME ": failed to initialize devfs\n");
     125                printf("%s: failed to initialize devfs\n", NAME);
    125126                return -1;
    126127        }
    127128       
    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");
     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);
    131133                return -1;
    132134        }
    133135       
    134         int rc = fs_register(vfs_phone, &devfs_reg, &devfs_vfs_info,
     136        int rc = fs_register(vfs_sess, &devfs_reg, &devfs_vfs_info,
    135137            devfs_connection);
    136138        if (rc != EOK) {
    137                 printf(NAME ": Failed to register file system (%d)\n", rc);
     139                printf("%s: Failed to register file system (%d)\n", NAME, rc);
    138140                return rc;
    139141        }
    140142       
    141         printf(NAME ": Accepting connections\n");
     143        printf("%s: Accepting connections\n", NAME);
    142144        task_retval(0);
    143145        async_manager();
Note: See TracChangeset for help on using the changeset viewer.