Changeset 991f645 in mainline for uspace/lib/c/generic


Ignore:
Timestamp:
2010-11-18T17:39:28Z (15 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.

Location:
uspace/lib/c/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/devmap.c

    r51a268f r991f645  
    132132 *
    133133 */
    134 int devmap_device_register(const char *fqdn, dev_handle_t *handle)
     134int devmap_device_register(const char *fqdn, devmap_handle_t *handle)
    135135{
    136136        int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
     
    163163       
    164164        if (handle != NULL)
    165                 *handle = (dev_handle_t) IPC_GET_ARG1(answer);
     165                *handle = (devmap_handle_t) IPC_GET_ARG1(answer);
    166166       
    167167        return retval;
    168168}
    169169
    170 int devmap_device_get_handle(const char *fqdn, dev_handle_t *handle, unsigned int flags)
     170int devmap_device_get_handle(const char *fqdn, devmap_handle_t *handle, unsigned int flags)
    171171{
    172172        int phone = devmap_get_phone(DEVMAP_CLIENT, flags);
     
    194194        if (retval != EOK) {
    195195                if (handle != NULL)
    196                         *handle = (dev_handle_t) -1;
     196                        *handle = (devmap_handle_t) -1;
    197197                return retval;
    198198        }
    199199       
    200200        if (handle != NULL)
    201                 *handle = (dev_handle_t) IPC_GET_ARG1(answer);
     201                *handle = (devmap_handle_t) IPC_GET_ARG1(answer);
    202202       
    203203        return retval;
    204204}
    205205
    206 int devmap_namespace_get_handle(const char *name, dev_handle_t *handle, unsigned int flags)
     206int devmap_namespace_get_handle(const char *name, devmap_handle_t *handle, unsigned int flags)
    207207{
    208208        int phone = devmap_get_phone(DEVMAP_CLIENT, flags);
     
    230230        if (retval != EOK) {
    231231                if (handle != NULL)
    232                         *handle = (dev_handle_t) -1;
     232                        *handle = (devmap_handle_t) -1;
    233233                return retval;
    234234        }
    235235       
    236236        if (handle != NULL)
    237                 *handle = (dev_handle_t) IPC_GET_ARG1(answer);
     237                *handle = (devmap_handle_t) IPC_GET_ARG1(answer);
    238238       
    239239        return retval;
    240240}
    241241
    242 devmap_handle_type_t devmap_handle_probe(dev_handle_t handle)
     242devmap_handle_type_t devmap_handle_probe(devmap_handle_t handle)
    243243{
    244244        int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
     
    255255}
    256256
    257 int devmap_device_connect(dev_handle_t handle, unsigned int flags)
     257int devmap_device_connect(devmap_handle_t handle, unsigned int flags)
    258258{
    259259        int phone;
     
    305305}
    306306
    307 static size_t devmap_count_devices_internal(int phone, dev_handle_t ns_handle)
     307static size_t devmap_count_devices_internal(int phone, devmap_handle_t ns_handle)
    308308{
    309309        ipcarg_t count;
     
    325325}
    326326
    327 size_t devmap_count_devices(dev_handle_t ns_handle)
     327size_t devmap_count_devices(devmap_handle_t ns_handle)
    328328{
    329329        int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
     
    387387}
    388388
    389 size_t devmap_get_devices(dev_handle_t ns_handle, dev_desc_t **data)
     389size_t devmap_get_devices(devmap_handle_t ns_handle, dev_desc_t **data)
    390390{
    391391        int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
  • uspace/lib/c/generic/vfs/vfs.c

    r51a268f r991f645  
    136136        }
    137137       
    138         dev_handle_t dev_handle;
    139         int res = devmap_device_get_handle(fqdn, &dev_handle, flags);
     138        devmap_handle_t devmap_handle;
     139        int res = devmap_device_get_handle(fqdn, &devmap_handle, flags);
    140140        if (res != EOK) {
    141141                if (null_id != -1)
     
    159159       
    160160        ipcarg_t rc_orig;
    161         aid_t req = async_send_2(vfs_phone, VFS_IN_MOUNT, dev_handle, flags, NULL);
     161        aid_t req = async_send_2(vfs_phone, VFS_IN_MOUNT, devmap_handle, flags, NULL);
    162162        ipcarg_t rc = async_data_write_start(vfs_phone, (void *) mpa, mpa_size);
    163163        if (rc != EOK) {
     
    328328        ipc_call_t answer;
    329329        aid_t req = async_send_4(vfs_phone, VFS_IN_OPEN_NODE, node->fs_handle,
    330             node->dev_handle, node->index, oflag, &answer);
     330            node->devmap_handle, node->index, oflag, &answer);
    331331       
    332332        ipcarg_t rc;
     
    797797        if (rc == EOK) {
    798798                node->fs_handle = stat.fs_handle;
    799                 node->dev_handle = stat.dev_handle;
     799                node->devmap_handle = stat.devmap_handle;
    800800                node->index = stat.index;
    801801        }
Note: See TracChangeset for help on using the changeset viewer.