Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0daba21 in mainline for uspace/lib/libfs/libfs.h


Ignore:
Timestamp:
2009-09-24T15:56:54Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
54e4479
Parents:
edb14ca
Message:

Most libfs operations should be able to return an error code.

File:
1 edited

Legend:

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

    redb14ca r0daba21  
    5656
    5757typedef struct {
    58         fs_node_t * (* match)(fs_node_t *, const char *);
    59         fs_node_t * (* node_get)(dev_handle_t, fs_index_t);
    60         void (* node_put)(fs_node_t *);
    61         fs_node_t * (* create)(dev_handle_t, int);
     58        /*
     59         * The first set of methods are functions that return an integer error
     60         * code. If some additional return value is to be returned, the first
     61         * argument holds the output argument.
     62         */
     63        int (* root_get)(fs_node_t **, dev_handle_t);
     64        int (* match)(fs_node_t **, fs_node_t *, const char *);
     65        int (* node_get)(fs_node_t **, dev_handle_t, fs_index_t);
     66        int (* node_put)(fs_node_t *);
     67        int (* create)(fs_node_t **, dev_handle_t, int);
    6268        int (* destroy)(fs_node_t *);
    6369        int (* link)(fs_node_t *, fs_node_t *, const char *);
    6470        int (* unlink)(fs_node_t *, fs_node_t *, const char *);
     71        int (* has_children)(bool *, fs_node_t *);
     72        /*
     73         * The second set of methods are usually mere getters that do not return
     74         * an integer error code.
     75         */
    6576        fs_index_t (* index_get)(fs_node_t *);
    6677        size_t (* size_get)(fs_node_t *);
    6778        unsigned (* lnkcnt_get)(fs_node_t *);
    68         bool (* has_children)(fs_node_t *);
    69         fs_node_t *(* root_get)(dev_handle_t);
    7079        char (* plb_get_char)(unsigned pos);
    7180        bool (* is_directory)(fs_node_t *);
Note: See TracChangeset for help on using the changeset viewer.