Changeset 41811af in mainline for uspace/srv/fs/tmpfs/tmpfs.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/tmpfs/tmpfs.c

    r9536e6e r41811af  
    3030/** @addtogroup fs
    3131 * @{
    32  */ 
     32 */
    3333
    3434/**
     
    4343#include "tmpfs.h"
    4444#include <ipc/services.h>
    45 #include <ipc/ns.h>
     45#include <ns.h>
    4646#include <async.h>
    4747#include <errno.h>
     
    9494       
    9595        dprintf(NAME ": connection opened\n");
    96         while (1) {
    97                 ipc_callid_t callid;
     96       
     97        while (true) {
    9898                ipc_call_t call;
    99        
    100                 callid = async_get_call(&call);
    101                 switch  (IPC_GET_IMETHOD(call)) {
    102                 case IPC_M_PHONE_HUNGUP:
     99                ipc_callid_t callid = async_get_call(&call);
     100               
     101                if (!IPC_GET_IMETHOD(call))
    103102                        return;
     103               
     104                switch (IPC_GET_IMETHOD(call)) {
    104105                case VFS_OUT_MOUNTED:
    105106                        tmpfs_mounted(callid, &call);
     
    151152{
    152153        printf(NAME ": HelenOS TMPFS file system server\n");
    153 
     154       
    154155        if (!tmpfs_init()) {
    155156                printf(NAME ": failed to initialize TMPFS\n");
    156157                return -1;
    157158        }
    158 
    159         int vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
    160         if (vfs_phone < EOK) {
     159       
     160        async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
     161            SERVICE_VFS, 0, 0);
     162        if (!vfs_sess) {
    161163                printf(NAME ": Unable to connect to VFS\n");
    162164                return -1;
    163165        }
    164 
    165         int rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info,
     166       
     167        int rc = fs_register(vfs_sess, &tmpfs_reg, &tmpfs_vfs_info,
    166168            tmpfs_connection);
    167169        if (rc != EOK) {
     
    169171                return rc;
    170172        }
    171 
     173       
    172174        printf(NAME ": Accepting connections\n");
    173175        task_retval(0);
    174176        async_manager();
    175         /* not reached */
     177       
     178        /* Not reached */
    176179        return 0;
    177180}
     
    179182/**
    180183 * @}
    181  */ 
     184 */
Note: See TracChangeset for help on using the changeset viewer.