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


Ignore:
Timestamp:
2010-01-26T19:16:58Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1715b6af, bb0d3d24
Parents:
9bddf37
Message:

Finish implementation of tmpfs_unmounted().

File:
1 edited

Legend:

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

    r9bddf37 re056e820  
    233233}
    234234
     235static void tmpfs_instance_done(dev_handle_t dev_handle)
     236{
     237        unsigned long key[] = {
     238                [NODES_KEY_DEV] = dev_handle
     239        };
     240        /*
     241         * Here we are making use of one special feature of our hash table
     242         * implementation, which allows to remove more items based on a partial
     243         * key match. In the following, we are going to remove all nodes
     244         * matching our device handle. The nodes_remove_callback() function will
     245         * take care of resource deallocation.
     246         */
     247        hash_table_remove(&nodes, key, 1);
     248}
     249
    235250int tmpfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
    236251{
     
    471486void tmpfs_unmounted(ipc_callid_t rid, ipc_call_t *request)
    472487{
    473         ipc_answer_0(rid, ENOTSUP);
     488        dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     489
     490        tmpfs_instance_done(dev_handle);
     491        ipc_answer_0(rid, EOK);
    474492}
    475493
Note: See TracChangeset for help on using the changeset viewer.