Changeset 80e8482 in mainline


Ignore:
Timestamp:
2008-04-15T03:01:59Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45f244b
Parents:
d9e9caf
Message:

Add stubs for unimplemented FAT libfs operations.

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libfs/libfs.c

    rd9e9caf r80e8482  
    199199                                        if (!ops->link(cur, nodep, component)) {
    200200                                                if (lflag & L_CREATE)
    201                                                         ops->destroy(nodep);
     201                                                        (void)ops->destroy(nodep);
    202202                                                ipc_answer_0(rid, ENOSPC);
    203203                                        } else {
     
    268268                                if (!ops->link(cur, nodep, component)) {
    269269                                        if (lflag & L_CREATE)
    270                                                 ops->destroy(nodep);
     270                                                (void)ops->destroy(nodep);
    271271                                        ipc_answer_0(rid, ENOSPC);
    272272                                } else {
  • uspace/lib/libfs/libfs.h

    rd9e9caf r80e8482  
    4747        void (* node_put)(void *);
    4848        void * (* create)(int);
    49         void (* destroy)(void *);
     49        bool (* destroy)(void *);
    5050        bool (* link)(void *, void *, const char *);
    5151        int (* unlink)(void *, void *);
  • uspace/srv/fs/fat/fat_ops.c

    rd9e9caf r80e8482  
    305305                list_append(&nodep->ffn_link, &ffn_head);
    306306        futex_up(&fin_futex);
     307}
     308
     309static void *fat_create(int flags)
     310{
     311        return NULL;    /* not supported at the moment */
     312}
     313
     314static bool fat_destroy(void *node)
     315{
     316        return false;   /* not supported at the moment */
     317}
     318
     319static bool fat_link(void *prnt, void *chld, const char *name)
     320{
     321        return false;   /* not supported at the moment */
     322}
     323
     324static int fat_unlink(void *prnt, void *chld)
     325{
     326        return ENOTSUP; /* not supported at the moment */
    307327}
    308328
     
    446466        .node_get = fat_node_get,
    447467        .node_put = fat_node_put,
    448         .create = NULL,
    449         .destroy = NULL,
    450         .link = NULL,
    451         .unlink = NULL,
     468        .create = fat_create,
     469        .destroy = fat_destroy,
     470        .link = fat_link,
     471        .unlink = fat_unlink,
    452472        .index_get = fat_index_get,
    453473        .size_get = fat_size_get,
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    rd9e9caf r80e8482  
    7676static bool tmpfs_link_node(void *, void *, const char *);
    7777static int tmpfs_unlink_node(void *, void *);
    78 static void tmpfs_destroy_node(void *);
     78static bool tmpfs_destroy_node(void *);
    7979
    8080/* Implementation of helper functions. */
     
    375375}
    376376
    377 void tmpfs_destroy_node(void *nodep)
     377bool tmpfs_destroy_node(void *nodep)
    378378{
    379379        tmpfs_dentry_t *dentry = (tmpfs_dentry_t *) nodep;
     
    391391                free(dentry->data);
    392392        free(dentry);
     393        return true;
    393394}
    394395
Note: See TracChangeset for help on using the changeset viewer.