Changeset 991f645 in mainline for uspace/srv/fs/devfs/devfs_ops.c
- Timestamp:
- 2010-11-18T17:39:28Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b5a4131
- Parents:
- 51a268f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/devfs/devfs_ops.c
r51a268f r991f645 54 54 typedef struct { 55 55 devmap_handle_type_t type; 56 dev _handle_t handle;56 devmap_handle_t handle; 57 57 } devfs_node_t; 58 58 59 59 /** Opened devices structure */ 60 60 typedef struct { 61 dev _handle_t handle;61 devmap_handle_t handle; 62 62 int phone; 63 63 size_t refcount; … … 84 84 { 85 85 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]); 87 87 } 88 88 … … 99 99 100 100 static int devfs_node_get_internal(fs_node_t **rfn, devmap_handle_type_t type, 101 dev _handle_t handle)101 devmap_handle_t handle) 102 102 { 103 103 devfs_node_t *node = (devfs_node_t *) malloc(sizeof(devfs_node_t)); … … 122 122 } 123 123 124 static int devfs_root_get(fs_node_t **rfn, dev _handle_t dev_handle)124 static int devfs_root_get(fs_node_t **rfn, devmap_handle_t devmap_handle) 125 125 { 126 126 return devfs_node_get_internal(rfn, DEV_HANDLE_NONE, 0); … … 154 154 155 155 /* Search root namespace */ 156 dev _handle_t namespace;156 devmap_handle_t namespace; 157 157 if (devmap_namespace_get_handle("", &namespace, 0) == EOK) { 158 158 count = devmap_get_devices(namespace, &devs); … … 200 200 } 201 201 202 static int devfs_node_get(fs_node_t **rfn, dev _handle_t dev_handle, fs_index_t index)202 static int devfs_node_get(fs_node_t **rfn, devmap_handle_t devmap_handle, fs_index_t index) 203 203 { 204 204 return devfs_node_get_internal(rfn, devmap_handle_probe(index), index); … … 269 269 } 270 270 271 static int devfs_create_node(fs_node_t **rfn, dev _handle_t dev_handle, int lflag)271 static int devfs_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int lflag) 272 272 { 273 273 assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY)); … … 304 304 305 305 /* Root namespace */ 306 dev _handle_t namespace;306 devmap_handle_t namespace; 307 307 if (devmap_namespace_get_handle("", &namespace, 0) == EOK) { 308 308 count = devmap_count_devices(namespace); … … 372 372 } 373 373 374 static dev _handle_t devfs_device_get(fs_node_t *fn)374 static devmap_handle_t devfs_device_get(fs_node_t *fn) 375 375 { 376 376 devfs_node_t *node = (devfs_node_t *) fn->data; … … 501 501 502 502 /* Search root namespace */ 503 dev _handle_t namespace;503 devmap_handle_t namespace; 504 504 if (devmap_namespace_get_handle("", &namespace, 0) == EOK) { 505 505 count = devmap_get_devices(namespace, &desc);
Note:
See TracChangeset
for help on using the changeset viewer.