Changeset 45f244b in mainline


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

libfs destroy operation should rather return an error code instead of a truth
value.

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified uspace/lib/libfs/libfs.h

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

    r80e8482 r45f244b  
    312312}
    313313
    314 static bool fat_destroy(void *node)
    315 {
    316         return false;   /* not supported at the moment */
     314static int fat_destroy(void *node)
     315{
     316        return ENOTSUP; /* not supported at the moment */
    317317}
    318318
  • TabularUnified uspace/srv/fs/tmpfs/tmpfs_ops.c

    r80e8482 r45f244b  
    7676static bool tmpfs_link_node(void *, void *, const char *);
    7777static int tmpfs_unlink_node(void *, void *);
    78 static bool tmpfs_destroy_node(void *);
     78static int tmpfs_destroy_node(void *);
    7979
    8080/* Implementation of helper functions. */
     
    375375}
    376376
    377 bool tmpfs_destroy_node(void *nodep)
     377int 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;
     393        return EOK;
    394394}
    395395
     
    580580        dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
    581581        fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
     582        int rc;
    582583
    583584        link_t *hlp;
     
    590591        tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t,
    591592            dh_link);
    592         tmpfs_destroy_node(dentry);
    593         ipc_answer_0(rid, EOK);
     593        rc = tmpfs_destroy_node(dentry);
     594        ipc_answer_0(rid, rc);
    594595}
    595596
Note: See TracChangeset for help on using the changeset viewer.