Changeset 991f645 in mainline for uspace/srv/fs/devfs/devfs_ops.c


Ignore:
Timestamp:
2010-11-18T17:39:28Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b5a4131
Parents:
51a268f
Message:

Rename dev_handle_t to devmap_handle_t and make it explicitly clear that
dev_handle_t is a handle understood by devmap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/devfs/devfs_ops.c

    r51a268f r991f645  
    5454typedef struct {
    5555        devmap_handle_type_t type;
    56         dev_handle_t handle;
     56        devmap_handle_t handle;
    5757} devfs_node_t;
    5858
    5959/** Opened devices structure */
    6060typedef struct {
    61         dev_handle_t handle;
     61        devmap_handle_t handle;
    6262        int phone;
    6363        size_t refcount;
     
    8484{
    8585        device_t *dev = hash_table_get_instance(item, device_t, link);
    86         return (dev->handle == (dev_handle_t) key[DEVICES_KEY_HANDLE]);
     86        return (dev->handle == (devmap_handle_t) key[DEVICES_KEY_HANDLE]);
    8787}
    8888
     
    9999
    100100static int devfs_node_get_internal(fs_node_t **rfn, devmap_handle_type_t type,
    101     dev_handle_t handle)
     101    devmap_handle_t handle)
    102102{
    103103        devfs_node_t *node = (devfs_node_t *) malloc(sizeof(devfs_node_t));
     
    122122}
    123123
    124 static int devfs_root_get(fs_node_t **rfn, dev_handle_t dev_handle)
     124static int devfs_root_get(fs_node_t **rfn, devmap_handle_t devmap_handle)
    125125{
    126126        return devfs_node_get_internal(rfn, DEV_HANDLE_NONE, 0);
     
    154154               
    155155                /* Search root namespace */
    156                 dev_handle_t namespace;
     156                devmap_handle_t namespace;
    157157                if (devmap_namespace_get_handle("", &namespace, 0) == EOK) {
    158158                        count = devmap_get_devices(namespace, &devs);
     
    200200}
    201201
    202 static int devfs_node_get(fs_node_t **rfn, dev_handle_t dev_handle, fs_index_t index)
     202static int devfs_node_get(fs_node_t **rfn, devmap_handle_t devmap_handle, fs_index_t index)
    203203{
    204204        return devfs_node_get_internal(rfn, devmap_handle_probe(index), index);
     
    269269}
    270270
    271 static int devfs_create_node(fs_node_t **rfn, dev_handle_t dev_handle, int lflag)
     271static int devfs_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int lflag)
    272272{
    273273        assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY));
     
    304304               
    305305                /* Root namespace */
    306                 dev_handle_t namespace;
     306                devmap_handle_t namespace;
    307307                if (devmap_namespace_get_handle("", &namespace, 0) == EOK) {
    308308                        count = devmap_count_devices(namespace);
     
    372372}
    373373
    374 static dev_handle_t devfs_device_get(fs_node_t *fn)
     374static devmap_handle_t devfs_device_get(fs_node_t *fn)
    375375{
    376376        devfs_node_t *node = (devfs_node_t *) fn->data;
     
    501501               
    502502                /* Search root namespace */
    503                 dev_handle_t namespace;
     503                devmap_handle_t namespace;
    504504                if (devmap_namespace_get_handle("", &namespace, 0) == EOK) {
    505505                        count = devmap_get_devices(namespace, &desc);
Note: See TracChangeset for help on using the changeset viewer.