Changeset 4dc6a32 in mainline


Ignore:
Timestamp:
2011-03-08T21:26:08Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b83e16ff
Parents:
163cf12
Message:

ext2fs server now (almost, as it is not synchronized yet) supports mounting and basic reading of directories

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext2/libext2_filesystem.c

    r163cf12 r4dc6a32  
    232232       
    233233        newref->inode = newref->block->data + offset_in_block;
     234        newref->index = index+1; // we decremented index above
    234235       
    235236        *ref = newref;
  • uspace/lib/ext2/libext2_inode.h

    r163cf12 r4dc6a32  
    7575#define EXT2_INODE_DIRECT_BLOCKS        12
    7676
     77#define EXT2_INODE_ROOT_INDEX           2
     78
    7779typedef struct ext2_inode_ref {
    7880        block_t *block; // Reference to a block containing this inode
    7981        ext2_inode_t *inode;
     82        uint32_t index; // Index number of this inode
    8083} ext2_inode_ref_t;
    8184
  • uspace/srv/fs/ext2fs/ext2fs.c

    r163cf12 r4dc6a32  
    7474 * request has been completed.
    7575 */
    76 static void ext2_connection(ipc_callid_t iid, ipc_call_t *icall)
     76static void ext2fs_connection(ipc_callid_t iid, ipc_call_t *icall)
    7777{
    7878        if (iid) {
     
    152152                return -1;
    153153        }
    154        
    155         rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2_connection);
     154
     155        rc = ext2fs_global_init();
     156        if (rc != EOK) {
     157                printf(NAME ": Failed global initialization\n");
     158                return 1;
     159        }       
     160               
     161        rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2fs_connection);
    156162       
    157163        printf(NAME ": Accepting connections\n");
  • uspace/srv/fs/ext2fs/ext2fs.h

    r163cf12 r4dc6a32  
    5151
    5252extern int ext2fs_global_init(void);
     53extern int ext2fs_global_fini(void);
    5354extern void ext2fs_mounted(ipc_callid_t, ipc_call_t *);
    5455extern void ext2fs_mount(ipc_callid_t, ipc_call_t *);
  • uspace/srv/fs/ext2fs/ext2fs_ops.c

    r163cf12 r4dc6a32  
    5757#include <adt/hash_table.h>
    5858
    59 #define EXT2_NODE(node) ((node) ? (ext2fs_node_t *) (node)->data : NULL)
    60 #define FS_NODE(node)   ((node) ? (node)->bp : NULL)
    61 
    62 #define FS_BUCKETS_LOG  12
    63 #define FS_BUCKETS      (1 << FS_BUCKETS_LOG)
     59#define EXT2FS_NODE(node)       ((node) ? (ext2fs_node_t *) (node)->data : NULL)
     60#define EXT2FS_DBG(format, ...) {if (false) printf("ext2fs: %s: " format "\n", __FUNCTION__, ##__VA_ARGS__);}
     61
     62typedef struct ext2fs_instance {
     63        link_t link;
     64        devmap_handle_t devmap_handle;
     65        ext2_filesystem_t *filesystem;
     66} ext2fs_instance_t;
     67
     68typedef struct ext2fs_node {
     69        ext2fs_instance_t *instance;
     70        ext2_inode_ref_t *inode_ref;
     71} ext2fs_node_t;
     72
     73static int ext2fs_instance_get(devmap_handle_t, ext2fs_instance_t **);
    6474
    6575/*
     
    8797 * Static variables
    8898 */
    89 
    90 /**
    91  * Global hash table holding a mapping from devmap handles to
    92  * ext2_filesystem_t structures
    93  */
    94 //TODO
    95 //static hash_table_t fs_hash;
    96 
    97 /**
    98  * Mutex protecting fs_hash
    99  */
    100 static FIBRIL_MUTEX_INITIALIZE(fs_hash_lock);
     99static LIST_INITIALIZE(instance_list);
    101100
    102101/**
     
    105104int ext2fs_global_init(void)
    106105{
    107         //TODO
    108         //if (!hash_table_create(&fs_hash, FS_BUCKETS, 1, &fs_hash_ops)) {
    109         //      return ENOMEM;
    110         //}
    111        
     106        return EOK;
     107}
     108
     109int ext2fs_global_fini(void)
     110{
    112111        return EOK;
    113112}
     
    119118 */
    120119
     120/**
     121 * Find an instance of filesystem for the given devmap_handle
     122 */
     123int ext2fs_instance_get(devmap_handle_t devmap_handle, ext2fs_instance_t **inst)
     124{
     125        EXT2FS_DBG("(%u, -)", devmap_handle);
     126        link_t *link;
     127        ext2fs_instance_t *tmp;
     128
     129        if (list_empty(&instance_list)) {
     130                EXT2FS_DBG("list empty");
     131                return EINVAL;
     132        }
     133
     134        for (link = instance_list.next; link != &instance_list; link = link->next) {
     135                tmp = list_get_instance(link, ext2fs_instance_t, link);
     136               
     137                if (tmp->devmap_handle == devmap_handle) {
     138                        *inst = tmp;
     139                        return EOK;
     140                }
     141        }
     142       
     143        EXT2FS_DBG("not found");
     144        return EINVAL;
     145}
     146
     147
     148
    121149int ext2fs_root_get(fs_node_t **rfn, devmap_handle_t devmap_handle)
    122150{
    123         // TODO
    124         return 0;
    125         //return ext2fs_node_get(rfn, devmap_handle, 0);
     151        EXT2FS_DBG("(-, %u)", devmap_handle);
     152        return ext2fs_node_get(rfn, devmap_handle, EXT2_INODE_ROOT_INDEX);
    126153}
    127154
    128155int ext2fs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
    129156{
    130         // TODO
    131         return ENOTSUP;
     157        EXT2FS_DBG("(-,-,%s)", component);
     158        ext2fs_node_t *eparent = EXT2FS_NODE(pfn);
     159        ext2_filesystem_t *fs;
     160        ext2_directory_iterator_t it;
     161        int rc;
     162        size_t name_size;
     163        size_t component_size;
     164        bool found = false;
     165       
     166        fs = eparent->instance->filesystem;
     167       
     168        if (!ext2_inode_is_type(fs->superblock, eparent->inode_ref->inode,
     169            EXT2_INODE_MODE_DIRECTORY)) {
     170                return ENOTDIR;
     171        }
     172       
     173        rc = ext2_directory_iterator_init(&it, fs, eparent->inode_ref);
     174        if (rc != EOK) {
     175                return rc;
     176        }
     177
     178        // Find length of component in bytes
     179        // TODO: check for library function call that does this
     180        component_size = 0;
     181        while (*(component+component_size) != 0) {
     182                component_size++;
     183        }
     184       
     185        while (it.current != NULL) {
     186                // ignore empty directory entries
     187                if (it.current->inode != 0) {
     188                        name_size = ext2_directory_entry_ll_get_name_length(fs->superblock,
     189                                it.current);
     190
     191                        if (name_size == component_size && bcmp(component, &it.current->name,
     192                                    name_size) == 0) {
     193                                // FIXME: this may be done better (give instance as param)
     194                                rc = ext2fs_node_get(rfn, eparent->instance->devmap_handle,
     195                                        it.current->inode);
     196                                if (rc != EOK) {
     197                                        ext2_directory_iterator_fini(&it);
     198                                        return rc;
     199                                }
     200                                found = true;
     201                                break;
     202                        }
     203                }
     204               
     205                rc = ext2_directory_iterator_next(&it);
     206                if (rc != EOK) {
     207                        ext2_directory_iterator_fini(&it);
     208                        return rc;
     209                }
     210        }
     211       
     212        ext2_directory_iterator_fini(&it);
     213       
     214        if (!found) {
     215                return ENOENT;
     216        }
     217       
     218        return EOK;
    132219}
    133220
     
    135222int ext2fs_node_get(fs_node_t **rfn, devmap_handle_t devmap_handle, fs_index_t index)
    136223{
    137         // TODO
    138         return ENOTSUP;
     224        EXT2FS_DBG("(-,%u,%u)", devmap_handle, index);
     225        int rc;
     226        fs_node_t *node = NULL;
     227        ext2fs_node_t *enode = NULL;
     228        ext2fs_instance_t *inst = NULL;
     229        ext2_inode_ref_t *inode_ref = NULL;
     230
     231        enode = malloc(sizeof(ext2fs_node_t));
     232        if (enode == NULL) {
     233                return ENOMEM;
     234        }
     235
     236        node = malloc(sizeof(fs_node_t));
     237        if (node == NULL) {
     238                free(enode);
     239                return ENOMEM;
     240        }
     241       
     242        fs_node_initialize(node);
     243
     244        rc = ext2fs_instance_get(devmap_handle, &inst);
     245        if (rc != EOK) {
     246                free(enode);
     247                free(node);
     248                return rc;
     249        }
     250               
     251        rc = ext2_filesystem_get_inode_ref(inst->filesystem, index, &inode_ref);
     252        if (rc != EOK) {
     253                free(enode);
     254                free(node);
     255                return rc;
     256        }
     257       
     258        enode->inode_ref = inode_ref;
     259        enode->instance = inst;
     260        node->data = enode;
     261        *rfn = node;
     262       
     263        EXT2FS_DBG("inode: %u", inode_ref->index);
     264       
     265        EXT2FS_DBG("EOK");
     266
     267        return EOK;
    139268}
    140269
    141270int ext2fs_node_open(fs_node_t *fn)
    142271{
     272        EXT2FS_DBG("");
    143273        /*
    144274         * Opening a file is stateless, nothing
     
    150280int ext2fs_node_put(fs_node_t *fn)
    151281{
     282        EXT2FS_DBG("");
     283        int rc;
     284        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     285        rc = ext2_filesystem_put_inode_ref(enode->inode_ref);
     286        if (rc != EOK) {
     287                EXT2FS_DBG("ext2_filesystem_put_inode_ref failed");
     288        }
     289        return rc;
     290}
     291
     292int ext2fs_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int flags)
     293{
     294        EXT2FS_DBG("");
    152295        // TODO
    153296        return ENOTSUP;
    154297}
    155298
    156 int ext2fs_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int flags)
    157 {
     299int ext2fs_destroy_node(fs_node_t *fn)
     300{
     301        EXT2FS_DBG("");
    158302        // TODO
    159303        return ENOTSUP;
    160304}
    161305
    162 int ext2fs_destroy_node(fs_node_t *fn)
    163 {
     306int ext2fs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
     307{
     308        EXT2FS_DBG("");
    164309        // TODO
    165310        return ENOTSUP;
    166311}
    167312
    168 int ext2fs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
    169 {
     313int ext2fs_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
     314{
     315        EXT2FS_DBG("");
    170316        // TODO
    171317        return ENOTSUP;
    172318}
    173319
    174 int ext2fs_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
    175 {
    176         // TODO
    177         return ENOTSUP;
    178 }
    179 
    180320int ext2fs_has_children(bool *has_children, fs_node_t *fn)
    181321{
    182         // TODO
    183         return ENOTSUP;
     322        EXT2FS_DBG("");
     323        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     324        ext2_directory_iterator_t it;
     325        ext2_filesystem_t *fs;
     326        int rc;
     327        bool found = false;
     328
     329        fs = enode->instance->filesystem;
     330
     331        if (!ext2_inode_is_type(fs->superblock, enode->inode_ref->inode,
     332            EXT2_INODE_MODE_DIRECTORY)) {
     333                *has_children = false;
     334                EXT2FS_DBG("EOK - false");
     335                return EOK;
     336        }
     337       
     338        rc = ext2_directory_iterator_init(&it, fs, enode->inode_ref);
     339        if (rc != EOK) {
     340                EXT2FS_DBG("error %u", rc);
     341                return rc;
     342        }
     343       
     344        // Find a non-empty directory entry
     345        while (it.current != NULL) {
     346                if (it.current->inode != 0) {
     347                        found = true;
     348                        break;
     349                }
     350               
     351                rc = ext2_directory_iterator_next(&it);
     352                if (rc != EOK) {
     353                        ext2_directory_iterator_fini(&it);
     354                        EXT2FS_DBG("error %u", rc);
     355                        return rc;
     356                }
     357        }
     358       
     359        rc = ext2_directory_iterator_fini(&it);
     360        if (rc != EOK) {
     361                EXT2FS_DBG("error %u", rc);
     362                return rc;
     363        }
     364
     365        *has_children = found;
     366        EXT2FS_DBG("EOK");
     367       
     368        return EOK;
    184369}
    185370
     
    187372fs_index_t ext2fs_index_get(fs_node_t *fn)
    188373{
    189         // TODO
    190         return 0;
     374        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     375        EXT2FS_DBG("%u", enode->inode_ref->index);
     376        return enode->inode_ref->index;
    191377}
    192378
    193379aoff64_t ext2fs_size_get(fs_node_t *fn)
    194380{
    195         // TODO
    196         return 0;
     381        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     382        aoff64_t size = ext2_inode_get_size(enode->instance->filesystem->superblock,
     383            enode->inode_ref->inode);
     384        EXT2FS_DBG("%" PRIu64, size);
     385        return size;
    197386}
    198387
    199388unsigned ext2fs_lnkcnt_get(fs_node_t *fn)
    200389{
    201         // TODO
    202         return 0;
     390        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     391        unsigned count = ext2_inode_get_usage_count(enode->inode_ref->inode);
     392        EXT2FS_DBG("%u", count);
     393        return count;
    203394}
    204395
     
    210401bool ext2fs_is_directory(fs_node_t *fn)
    211402{
    212         // TODO
    213         return false;
     403        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     404        bool is_dir = ext2_inode_is_type(enode->instance->filesystem->superblock,
     405            enode->inode_ref->inode, EXT2_INODE_MODE_DIRECTORY);
     406        EXT2FS_DBG("%s", is_dir ? "true" : "false");
     407        EXT2FS_DBG("%u", enode->inode_ref->index);
     408        return is_dir;
    214409}
    215410
    216411bool ext2fs_is_file(fs_node_t *fn)
    217412{
    218         // TODO
    219         return false;
    220 }
    221 
    222 devmap_handle_t ext2fs_device_get(fs_node_t *node)
    223 {
    224         return 0;
     413        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     414        bool is_file = ext2_inode_is_type(enode->instance->filesystem->superblock,
     415            enode->inode_ref->inode, EXT2_INODE_MODE_FILE);
     416        EXT2FS_DBG("%s", is_file ? "true" : "false");
     417        return is_file;
     418}
     419
     420devmap_handle_t ext2fs_device_get(fs_node_t *fn)
     421{
     422        EXT2FS_DBG("");
     423        ext2fs_node_t *enode = EXT2FS_NODE(fn);
     424        return enode->instance->devmap_handle;
    225425}
    226426
     
    252452void ext2fs_mounted(ipc_callid_t rid, ipc_call_t *request)
    253453{
     454        EXT2FS_DBG("");
    254455        int rc;
    255456        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    256457        ext2_filesystem_t *fs;
     458        ext2fs_instance_t *inst;
     459       
     460       
    257461       
    258462        /* Accept the mount options */
     
    274478        }
    275479       
     480        /* Allocate instance structure */
     481        inst = (ext2fs_instance_t *) malloc(sizeof(ext2fs_instance_t));
     482        if (inst == NULL) {
     483                free(fs);
     484                async_answer_0(rid, ENOMEM);
     485                return;
     486        }
     487       
    276488        /* Initialize the filesystem  */
    277489        rc = ext2_filesystem_init(fs, devmap_handle);
    278490        if (rc != EOK) {
     491                free(fs);
     492                free(inst);
    279493                async_answer_0(rid, rc);
    280494                return;
     
    285499        if (rc != EOK) {
    286500                ext2_filesystem_fini(fs);
     501                free(fs);
     502                free(inst);
    287503                async_answer_0(rid, rc);
    288504                return;
    289505        }
    290506       
    291        
    292        
    293         // TODO
     507        /* Initialize instance and add to the list */
     508        link_initialize(&inst->link);
     509        inst->devmap_handle = devmap_handle;
     510        inst->filesystem = fs;
     511        list_append(&inst->link, &instance_list);
     512       
     513        async_answer_0(rid, EOK);
     514}
     515
     516void ext2fs_mount(ipc_callid_t rid, ipc_call_t *request)
     517{
     518        EXT2FS_DBG("");
     519        libfs_mount(&ext2fs_libfs_ops, ext2fs_reg.fs_handle, rid, request);
     520}
     521
     522void ext2fs_unmounted(ipc_callid_t rid, ipc_call_t *request)
     523{
     524        EXT2FS_DBG("");
     525        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
     526        ext2fs_instance_t *inst;
     527        int rc;
     528       
     529        rc = ext2fs_instance_get(devmap_handle, &inst);
     530       
     531        if (rc != EOK) {
     532                async_answer_0(rid, rc);
     533                return;
     534        }
     535       
     536        // TODO: check if the fs is busy
     537       
     538        // Remove the instance from list
     539        list_remove(&inst->link);
     540        ext2_filesystem_fini(inst->filesystem);
     541       
     542        async_answer_0(rid, EOK);
     543}
     544
     545void ext2fs_unmount(ipc_callid_t rid, ipc_call_t *request)
     546{
     547        EXT2FS_DBG("");
     548        libfs_unmount(&ext2fs_libfs_ops, rid, request);
     549}
     550
     551void ext2fs_lookup(ipc_callid_t rid, ipc_call_t *request)
     552{
     553        EXT2FS_DBG("");
     554        libfs_lookup(&ext2fs_libfs_ops, ext2fs_reg.fs_handle, rid, request);
     555}
     556
     557void ext2fs_read(ipc_callid_t rid, ipc_call_t *request)
     558{
     559        EXT2FS_DBG("");
     560        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
     561        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
     562        aoff64_t pos =
     563            (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), IPC_GET_ARG4(*request));
     564       
     565        ext2fs_instance_t *inst;
     566        ext2_inode_ref_t *inode_ref;
     567        int rc;
     568        ext2_directory_iterator_t it;
     569        aoff64_t cur;
     570        uint8_t *buf;
     571        size_t name_size;
     572
     573        /*
     574         * Receive the read request.
     575         */
     576        ipc_callid_t callid;
     577        size_t size;
     578        if (!async_data_read_receive(&callid, &size)) {
     579                async_answer_0(callid, EINVAL);
     580                async_answer_0(rid, EINVAL);
     581                return;
     582        }
     583       
     584        rc = ext2fs_instance_get(devmap_handle, &inst);
     585        if (rc != EOK) {
     586                async_answer_0(callid, rc);
     587                async_answer_0(rid, rc);
     588                return;
     589        }
     590       
     591        rc = ext2_filesystem_get_inode_ref(inst->filesystem, index, &inode_ref);
     592        if (rc != EOK) {
     593                async_answer_0(callid, rc);
     594                async_answer_0(rid, rc);
     595                return;
     596        }
     597       
     598        if (ext2_inode_is_type(inst->filesystem->superblock, inode_ref->inode,
     599                    EXT2_INODE_MODE_FILE)) {
     600                async_answer_0(callid, ENOTSUP);
     601                async_answer_0(rid, ENOTSUP);
     602        }
     603        else if (ext2_inode_is_type(inst->filesystem->superblock, inode_ref->inode,
     604                    EXT2_INODE_MODE_DIRECTORY)) {
     605                rc = ext2_directory_iterator_init(&it, inst->filesystem, inode_ref);
     606                if (rc != EOK) {
     607                        async_answer_0(callid, rc);
     608                        async_answer_0(rid, rc);
     609                        return;
     610                }
     611               
     612                cur = 0;
     613                while (it.current != NULL) {
     614                        if (it.current->inode != 0) {
     615                                if (cur == pos) {
     616                                        // This is the dir entry we want to read
     617                                        name_size = ext2_directory_entry_ll_get_name_length(
     618                                            inst->filesystem->superblock, it.current);
     619                                        // The on-disk entry does not contain \0 at the end
     620                                        // end of entry name, so we copy it to new buffer
     621                                        // and the \0 at the end
     622                                        buf = malloc(name_size+1);
     623                                        if (buf == NULL) {
     624                                                ext2_directory_iterator_fini(&it);
     625                                                async_answer_0(callid, ENOMEM);
     626                                                async_answer_0(rid, ENOMEM);
     627                                                return;
     628                                        }
     629                                        memcpy(buf, &it.current->name, name_size);
     630                                        *(buf+name_size) = 0;
     631                                        (void) async_data_read_finalize(callid, buf, name_size+1);
     632                                        break;
     633                                }
     634                                cur++;
     635                        }
     636                       
     637                        rc = ext2_directory_iterator_next(&it);
     638                        if (rc != EOK) {
     639                                ext2_directory_iterator_fini(&it);
     640                                async_answer_0(callid, rc);
     641                                async_answer_0(rid, rc);
     642                                return;
     643                        }
     644                }
     645               
     646                rc = ext2_directory_iterator_fini(&it);
     647                if (rc != EOK) {
     648                        async_answer_0(rid, ENOMEM);
     649                        return;
     650                }
     651               
     652                async_answer_1(rid, EOK, 1);           
     653        }
     654       
     655        // Other inode types not supported
     656        async_answer_0(callid, ENOTSUP);
    294657        async_answer_0(rid, ENOTSUP);
    295658}
    296659
    297 void ext2fs_mount(ipc_callid_t rid, ipc_call_t *request)
    298 {
    299         libfs_mount(&ext2fs_libfs_ops, ext2fs_reg.fs_handle, rid, request);
    300 }
    301 
    302 void ext2fs_unmounted(ipc_callid_t rid, ipc_call_t *request)
    303 {
    304 //      devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    305         // TODO
    306         async_answer_0(rid, ENOTSUP);
    307 }
    308 
    309 void ext2fs_unmount(ipc_callid_t rid, ipc_call_t *request)
    310 {
    311         libfs_unmount(&ext2fs_libfs_ops, rid, request);
    312 }
    313 
    314 void ext2fs_lookup(ipc_callid_t rid, ipc_call_t *request)
    315 {
    316         libfs_lookup(&ext2fs_libfs_ops, ext2fs_reg.fs_handle, rid, request);
    317 }
    318 
    319 void ext2fs_read(ipc_callid_t rid, ipc_call_t *request)
    320 {
     660void ext2fs_write(ipc_callid_t rid, ipc_call_t *request)
     661{
     662        EXT2FS_DBG("");
    321663//      devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    322664//      fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
     
    328670}
    329671
    330 void ext2fs_write(ipc_callid_t rid, ipc_call_t *request)
    331 {
    332 //      devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    333 //      fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    334 //      aoff64_t pos =
    335 //          (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), IPC_GET_ARG4(*request));
    336        
    337         // TODO
    338         async_answer_0(rid, ENOTSUP);
    339 }
    340 
    341672void ext2fs_truncate(ipc_callid_t rid, ipc_call_t *request)
    342673{
     674        EXT2FS_DBG("");
    343675//      devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    344676//      fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
     
    352684void ext2fs_close(ipc_callid_t rid, ipc_call_t *request)
    353685{
     686        EXT2FS_DBG("");
    354687        async_answer_0(rid, EOK);
    355688}
     
    357690void ext2fs_destroy(ipc_callid_t rid, ipc_call_t *request)
    358691{
     692        EXT2FS_DBG("");
    359693//      devmap_handle_t devmap_handle = (devmap_handle_t)IPC_GET_ARG1(*request);
    360694//      fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
     
    366700void ext2fs_open_node(ipc_callid_t rid, ipc_call_t *request)
    367701{
     702        EXT2FS_DBG("");
    368703        libfs_open_node(&ext2fs_libfs_ops, ext2fs_reg.fs_handle, rid, request);
    369704}
     
    371706void ext2fs_stat(ipc_callid_t rid, ipc_call_t *request)
    372707{
     708        EXT2FS_DBG("");
    373709        libfs_stat(&ext2fs_libfs_ops, ext2fs_reg.fs_handle, rid, request);
    374710}
     
    376712void ext2fs_sync(ipc_callid_t rid, ipc_call_t *request)
    377713{
     714        EXT2FS_DBG("");
    378715//      devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    379716//      fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
Note: See TracChangeset for help on using the changeset viewer.