Changeset a8e9ab8d in mainline for uspace/srv/fs/tmpfs/tmpfs_ops.c


Ignore:
Timestamp:
2008-03-09T17:18:30Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4072980
Parents:
2664838b
Message:

Support for rename().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    r2664838b ra8e9ab8d  
    7171/* Forward declarations of static functions. */
    7272static bool tmpfs_match(void *, void *, const char *);
     73static void *tmpfs_node_get(int, int, unsigned long);
    7374static void *tmpfs_create_node(int);
    7475static bool tmpfs_link_node(void *, void *, const char *);
     
    125126libfs_ops_t tmpfs_libfs_ops = {
    126127        .match = tmpfs_match,
     128        .node_get = tmpfs_node_get,
    127129        .create = tmpfs_create_node,
    128130        .destroy = tmpfs_destroy_node,
     
    259261
    260262        return !strcmp(namep->name, component);
     263}
     264
     265void *tmpfs_node_get(int fs_handle, int dev_handle, unsigned long index)
     266{
     267        link_t *lnk = hash_table_find(&dentries, &index);
     268        if (!lnk)
     269                return NULL;
     270        return hash_table_get_instance(lnk, tmpfs_dentry_t, dh_link);
    261271}
    262272
Note: See TracChangeset for help on using the changeset viewer.