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

Changeset 45f04f8 in mainline for uspace/srv/fs/devfs/devfs_ops.c


Ignore:
Timestamp:
2010-11-18T18:23:43Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
3f0a7971, a7811f17, cb569e6
Parents:
51a268f (diff), c63e70c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge changes that aim to do a better job in differentiating between
dev_handle_t and device_handle_t, respectively, by renaming these types to
devmap_handle_t and devman_handle_t, respectively.

File:
1 edited

Legend:

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

    r51a268f r45f04f8  
    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.