Changeset d3a9ae74 in mainline


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.

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    r5dd4f77a rd3a9ae74  
    106106        $(USPACE_PATH)/srv/fs/exfat/exfat \
    107107        $(USPACE_PATH)/srv/fs/ext2fs/ext2fs \
     108        $(USPACE_PATH)/srv/fs/ext4fs/ext4fs \
    108109        $(USPACE_PATH)/srv/taskmon/taskmon \
    109110        $(USPACE_PATH)/srv/hw/netif/ne2000/ne2000 \
  • uspace/Makefile

    r5dd4f77a rd3a9ae74  
    8888        srv/fs/locfs \
    8989        srv/fs/ext2fs \
     90        srv/fs/ext4fs \
    9091        srv/hid/console \
    9192        srv/hid/s3c24xx_ts \
  • uspace/srv/fs/ext4fs/Makefile

    r5dd4f77a rd3a9ae74  
    3333
    3434SOURCES = \
    35         ext4fs.c
     35        ext4fs.c \
     36        ext4fs_ops.c
    3637
    3738include $(USPACE_PREFIX)/Makefile.common
  • 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 * @}
  • uspace/srv/fs/ext4fs/ext4fs.h

    r5dd4f77a rd3a9ae74  
    3434#define EXT4FS_EXT4FS_H_
    3535
     36#include <libfs.h>
     37
     38extern vfs_out_ops_t ext4fs_ops;
     39extern libfs_ops_t ext4fs_libfs_ops;
     40
     41extern int ext4fs_global_init(void);
     42extern int ext4fs_global_fini(void);
     43
    3644
    3745#endif
Note: See TracChangeset for help on using the changeset viewer.