Changes in uspace/srv/fs/devfs/devfs_ops.c [991f645:4cac2d69] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/devfs/devfs_ops.c
r991f645 r4cac2d69 37 37 38 38 #include <ipc/ipc.h> 39 #include <macros.h>40 39 #include <bool.h> 41 40 #include <errno.h> 42 41 #include <malloc.h> 43 #include <str .h>42 #include <string.h> 44 43 #include <libfs.h> 45 44 #include <fibril_synch.h> … … 54 53 typedef struct { 55 54 devmap_handle_type_t type; 56 dev map_handle_t handle;55 dev_handle_t handle; 57 56 } devfs_node_t; 58 57 59 58 /** Opened devices structure */ 60 59 typedef struct { 61 dev map_handle_t handle;60 dev_handle_t handle; 62 61 int phone; 63 62 size_t refcount; … … 84 83 { 85 84 device_t *dev = hash_table_get_instance(item, device_t, link); 86 return (dev->handle == (dev map_handle_t) key[DEVICES_KEY_HANDLE]);85 return (dev->handle == (dev_handle_t) key[DEVICES_KEY_HANDLE]); 87 86 } 88 87 … … 99 98 100 99 static int devfs_node_get_internal(fs_node_t **rfn, devmap_handle_type_t type, 101 dev map_handle_t handle)100 dev_handle_t handle) 102 101 { 103 102 devfs_node_t *node = (devfs_node_t *) malloc(sizeof(devfs_node_t)); … … 122 121 } 123 122 124 static int devfs_root_get(fs_node_t **rfn, dev map_handle_t devmap_handle)123 static int devfs_root_get(fs_node_t **rfn, dev_handle_t dev_handle) 125 124 { 126 125 return devfs_node_get_internal(rfn, DEV_HANDLE_NONE, 0); … … 154 153 155 154 /* Search root namespace */ 156 dev map_handle_t namespace;155 dev_handle_t namespace; 157 156 if (devmap_namespace_get_handle("", &namespace, 0) == EOK) { 158 157 count = devmap_get_devices(namespace, &devs); … … 200 199 } 201 200 202 static int devfs_node_get(fs_node_t **rfn, dev map_handle_t devmap_handle, fs_index_t index)201 static int devfs_node_get(fs_node_t **rfn, dev_handle_t dev_handle, fs_index_t index) 203 202 { 204 203 return devfs_node_get_internal(rfn, devmap_handle_probe(index), index); … … 269 268 } 270 269 271 static int devfs_create_node(fs_node_t **rfn, dev map_handle_t devmap_handle, int lflag)270 static int devfs_create_node(fs_node_t **rfn, dev_handle_t dev_handle, int lflag) 272 271 { 273 272 assert((lflag & L_FILE) ^ (lflag & L_DIRECTORY)); … … 304 303 305 304 /* Root namespace */ 306 dev map_handle_t namespace;305 dev_handle_t namespace; 307 306 if (devmap_namespace_get_handle("", &namespace, 0) == EOK) { 308 307 count = devmap_count_devices(namespace); … … 338 337 } 339 338 340 static aoff64_t devfs_size_get(fs_node_t *fn)339 static size_t devfs_size_get(fs_node_t *fn) 341 340 { 342 341 return 0; … … 372 371 } 373 372 374 static dev map_handle_t devfs_device_get(fs_node_t *fn)373 static dev_handle_t devfs_device_get(fs_node_t *fn) 375 374 { 376 375 devfs_node_t *node = (devfs_node_t *) fn->data; … … 464 463 { 465 464 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); 466 aoff64_t pos = 467 (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), IPC_GET_ARG4(*request)); 465 off_t pos = (off_t) IPC_GET_ARG3(*request); 468 466 469 467 if (index == 0) { … … 501 499 502 500 /* Search root namespace */ 503 dev map_handle_t namespace;501 dev_handle_t namespace; 504 502 if (devmap_namespace_get_handle("", &namespace, 0) == EOK) { 505 503 count = devmap_get_devices(namespace, &desc); … … 599 597 { 600 598 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); 599 off_t pos = (off_t) IPC_GET_ARG3(*request); 600 601 601 if (index == 0) { 602 602 ipc_answer_0(rid, ENOTSUP);
Note:
See TracChangeset
for help on using the changeset viewer.