Changeset d3a9ae74 in mainline for uspace/srv/fs/ext4fs/ext4fs.c


Ignore:
Timestamp:
2011-09-27T15:48:31Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c9e71a
Parents:
5dd4f77a
Message:

Stubs for VFS and libfs operations.

File:
1 edited

Legend:

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

    r5dd4f77a rd3a9ae74  
    3636 */
    3737
     38#include <async.h>
     39#include <errno.h>
     40#include <libfs.h>
     41#include <ns.h>
     42#include <stdio.h>
     43#include <task.h>
     44#include <ipc/services.h>
     45#include "ext4fs.h"
     46#include "../../vfs/vfs.h"
     47
    3848#define NAME    "ext4fs"
    3949
     
    5666        }
    5767
    58         // TODO initialization and VFS connection
     68        async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
     69                SERVICE_VFS, 0, 0);
     70        if (!vfs_sess) {
     71                printf(NAME ": failed to connect to VFS\n");
     72                return -1;
     73        }
     74
     75        int rc = ext4fs_global_init();
     76        if (rc != EOK) {
     77                printf(NAME ": Failed global initialization\n");
     78                return 1;
     79        }
     80
     81        rc = fs_register(vfs_sess, &ext4fs_vfs_info, &ext4fs_ops,
     82            &ext4fs_libfs_ops);
     83        if (rc != EOK) {
     84                fprintf(stdout, NAME ": Failed to register fs (%d)\n", rc);
     85                return 1;
     86        }
    5987
    6088        printf(NAME ": Accepting connections\n");
    61         /* TODO uncomment when initialization
    6289        task_retval(0);
    6390        async_manager();
    64         */
    6591        /* not reached */
    6692        return 0;
    6793}
    6894
    69 
    7095/**
    7196 * @}
Note: See TracChangeset for help on using the changeset viewer.