Changeset 991f645 in mainline for uspace/srv


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.

Location:
uspace/srv
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    r51a268f r991f645  
    139139               
    140140                snprintf(name, 16, "%s/disk%d", NAMESPACE, i);
    141                 rc = devmap_device_register(name, &disk[i].dev_handle);
     141                rc = devmap_device_register(name, &disk[i].devmap_handle);
    142142                if (rc != EOK) {
    143143                        devmap_hangup_phone(DEVMAP_DRIVER);
     
    229229        ipc_call_t call;
    230230        ipcarg_t method;
    231         dev_handle_t dh;
     231        devmap_handle_t dh;
    232232        int flags;
    233233        int retval;
     
    242242        disk_id = -1;
    243243        for (i = 0; i < MAX_DISKS; i++)
    244                 if (disk[i].dev_handle == dh)
     244                if (disk[i].devmap_handle == dh)
    245245                        disk_id = i;
    246246
  • uspace/srv/bd/ata_bd/ata_bd.h

    r51a268f r991f645  
    287287
    288288        fibril_mutex_t lock;
    289         dev_handle_t dev_handle;
     289        devmap_handle_t devmap_handle;
    290290} disk_t;
    291291
  • uspace/srv/bd/file_bd/file_bd.c

    r51a268f r991f645  
    6060static FILE *img;
    6161
    62 static dev_handle_t dev_handle;
     62static devmap_handle_t devmap_handle;
    6363static fibril_mutex_t dev_lock;
    6464
     
    8282                return -1;
    8383
    84         rc = devmap_device_register(argv[2], &dev_handle);
     84        rc = devmap_device_register(argv[2], &devmap_handle);
    8585        if (rc != EOK) {
    8686                devmap_hangup_phone(DEVMAP_DRIVER);
  • uspace/srv/bd/gxe_bd/gxe_bd.c

    r51a268f r991f645  
    9393static gxe_bd_t *dev;
    9494
    95 static dev_handle_t dev_handle[MAX_DISKS];
     95static devmap_handle_t devmap_handle[MAX_DISKS];
    9696
    9797static fibril_mutex_t dev_lock[MAX_DISKS];
     
    143143        for (i = 0; i < MAX_DISKS; i++) {
    144144                snprintf(name, 16, "%s/disk%d", NAMESPACE, i);
    145                 rc = devmap_device_register(name, &dev_handle[i]);
     145                rc = devmap_device_register(name, &devmap_handle[i]);
    146146                if (rc != EOK) {
    147147                        devmap_hangup_phone(DEVMAP_DRIVER);
     
    161161        ipc_call_t call;
    162162        ipcarg_t method;
    163         dev_handle_t dh;
     163        devmap_handle_t dh;
    164164        int flags;
    165165        int retval;
     
    174174        disk_id = -1;
    175175        for (i = 0; i < MAX_DISKS; i++)
    176                 if (dev_handle[i] == dh)
     176                if (devmap_handle[i] == dh)
    177177                        disk_id = i;
    178178
  • uspace/srv/bd/part/guid_part/guid_part.c

    r51a268f r991f645  
    8383        aoff64_t length;
    8484        /** Device representing the partition (outbound device) */
    85         dev_handle_t dev;
     85        devmap_handle_t dev;
    8686        /** Points to next partition structure. */
    8787        struct part *next;
     
    9191
    9292/** Partitioned device (inbound device) */
    93 static dev_handle_t indev_handle;
     93static devmap_handle_t indev_handle;
    9494
    9595/** List of partitions. This structure is an empty head. */
     
    130130        int i;
    131131        char *name;
    132         dev_handle_t dev;
     132        devmap_handle_t dev;
    133133        uint64_t size_mb;
    134134        part_t *part;
     
    316316        ipc_call_t call;
    317317        ipcarg_t method;
    318         dev_handle_t dh;
     318        devmap_handle_t dh;
    319319        int flags;
    320320        int retval;
  • uspace/srv/bd/part/mbr_part/mbr_part.c

    r51a268f r991f645  
    101101        aoff64_t length;
    102102        /** Device representing the partition (outbound device) */
    103         dev_handle_t dev;
     103        devmap_handle_t dev;
    104104        /** Points to next partition structure. */
    105105        struct part *next;
     
    142142
    143143/** Partitioned device (inbound device) */
    144 static dev_handle_t indev_handle;
     144static devmap_handle_t indev_handle;
    145145
    146146/** List of partitions. This structure is an empty head. */
     
    181181        int i;
    182182        char *name;
    183         dev_handle_t dev;
     183        devmap_handle_t dev;
    184184        uint64_t size_mb;
    185185        part_t *part;
     
    394394        ipc_call_t call;
    395395        ipcarg_t method;
    396         dev_handle_t dh;
     396        devmap_handle_t dh;
    397397        int flags;
    398398        int retval;
  • uspace/srv/bd/rd/rd.c

    r51a268f r991f645  
    238238        }
    239239       
    240         dev_handle_t dev_handle;
    241         if (devmap_device_register("bd/initrd", &dev_handle) != EOK) {
     240        devmap_handle_t devmap_handle;
     241        if (devmap_device_register("bd/initrd", &devmap_handle) != EOK) {
    242242                devmap_hangup_phone(DEVMAP_DRIVER);
    243243                printf("%s: Unable to register device\n", NAME);
  • uspace/srv/devman/devman.c

    r51a268f r991f645  
    5959{
    6060        node_t *dev = hash_table_get_instance(item, node_t, devmap_link);
    61         return (dev->devmap_handle == (dev_handle_t) key[0]);
     61        return (dev->devmap_handle == (devmap_handle_t) key[0]);
    6262}
    6363
     
    11061106/* Devmap devices */
    11071107
    1108 node_t *find_devmap_tree_device(dev_tree_t *tree, dev_handle_t devmap_handle)
     1108node_t *find_devmap_tree_device(dev_tree_t *tree, devmap_handle_t devmap_handle)
    11091109{
    11101110        node_t *dev = NULL;
     
    11221122
    11231123node_t *find_devmap_class_device(class_list_t *classes,
    1124     dev_handle_t devmap_handle)
     1124    devmap_handle_t devmap_handle)
    11251125{
    11261126        node_t *dev = NULL;
  • uspace/srv/devman/devman.h

    r51a268f r991f645  
    157157        link_t classes;
    158158        /** Devmap handle if the device is registered by devmapper. */
    159         dev_handle_t devmap_handle;
     159        devmap_handle_t devmap_handle;
    160160       
    161161        /**
     
    248248        char *dev_name;
    249249        /** The handle of the device by device mapper in the class namespace. */
    250         dev_handle_t devmap_handle;
     250        devmap_handle_t devmap_handle;
    251251       
    252252        /**
     
    337337/* Devmap devices */
    338338
    339 extern node_t *find_devmap_tree_device(dev_tree_t *, dev_handle_t);
    340 extern node_t *find_devmap_class_device(class_list_t *, dev_handle_t);
     339extern node_t *find_devmap_tree_device(dev_tree_t *, devmap_handle_t);
     340extern node_t *find_devmap_class_device(class_list_t *, devmap_handle_t);
    341341
    342342extern void class_add_devmap_device(class_list_t *, dev_class_info_t *);
  • uspace/srv/devman/main.c

    r51a268f r991f645  
    464464static void devman_connection_devmapper(ipc_callid_t iid, ipc_call_t *icall)
    465465{
    466         dev_handle_t devmap_handle = IPC_GET_METHOD(*icall);
     466        devmap_handle_t devmap_handle = IPC_GET_METHOD(*icall);
    467467        node_t *dev;
    468468
  • uspace/srv/devmap/devmap.c

    r51a268f r991f645  
    7575        link_t namespaces;
    7676        /** Unique namespace identifier */
    77         dev_handle_t handle;
     77        devmap_handle_t handle;
    7878        /** Namespace name */
    7979        char *name;
     
    9292        link_t driver_devices;
    9393        /** Unique device identifier */
    94         dev_handle_t handle;
     94        devmap_handle_t handle;
    9595        /** Device namespace */
    9696        devmap_namespace_t *namespace;
     
    118118static FIBRIL_MUTEX_INITIALIZE(null_devices_mutex);
    119119
    120 static dev_handle_t last_handle = 0;
     120static devmap_handle_t last_handle = 0;
    121121static devmap_device_t *null_devices[NULL_DEVICES];
    122122
    123 static dev_handle_t devmap_create_handle(void)
     123static devmap_handle_t devmap_create_handle(void)
    124124{
    125125        /* TODO: allow reusing old handles after their unregistration
     
    233233 *
    234234 */
    235 static devmap_namespace_t *devmap_namespace_find_handle(dev_handle_t handle)
     235static devmap_namespace_t *devmap_namespace_find_handle(devmap_handle_t handle)
    236236{
    237237        link_t *item;
     
    275275 *
    276276 */
    277 static devmap_device_t *devmap_device_find_handle(dev_handle_t handle)
     277static devmap_device_t *devmap_device_find_handle(devmap_handle_t handle)
    278278{
    279279        link_t *item;
     
    608608         * Get handle from request
    609609         */
    610         dev_handle_t handle = IPC_GET_ARG2(*call);
     610        devmap_handle_t handle = IPC_GET_ARG2(*call);
    611611        devmap_device_t *dev = devmap_device_find_handle(handle);
    612612       
  • 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);
  • uspace/srv/fs/fat/fat.h

    r51a268f r991f645  
    176176
    177177        fibril_mutex_t  lock;
    178         dev_handle_t    dev_handle;
     178        devmap_handle_t devmap_handle;
    179179        fs_index_t      index;
    180180        /**
     
    242242extern void fat_sync(ipc_callid_t, ipc_call_t *);
    243243
    244 extern int fat_idx_get_new(fat_idx_t **, dev_handle_t);
    245 extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned);
    246 extern fat_idx_t *fat_idx_get_by_index(dev_handle_t, fs_index_t);
     244extern int fat_idx_get_new(fat_idx_t **, devmap_handle_t);
     245extern fat_idx_t *fat_idx_get_by_pos(devmap_handle_t, fat_cluster_t, unsigned);
     246extern fat_idx_t *fat_idx_get_by_index(devmap_handle_t, fs_index_t);
    247247extern void fat_idx_destroy(fat_idx_t *);
    248248extern void fat_idx_hashin(fat_idx_t *);
     
    251251extern int fat_idx_init(void);
    252252extern void fat_idx_fini(void);
    253 extern int fat_idx_init_by_dev_handle(dev_handle_t);
    254 extern void fat_idx_fini_by_dev_handle(dev_handle_t);
     253extern int fat_idx_init_by_devmap_handle(devmap_handle_t);
     254extern void fat_idx_fini_by_devmap_handle(devmap_handle_t);
    255255
    256256#endif
  • uspace/srv/fs/fat/fat_fat.c

    r51a268f r991f645  
    7070 *
    7171 * @param bs            Buffer holding the boot sector for the file.
    72  * @param dev_handle    Device handle of the device with the file.
     72 * @param devmap_handle Device handle of the device with the file.
    7373 * @param firstc        First cluster to start the walk with.
    7474 * @param lastc         If non-NULL, output argument hodling the last cluster
     
    8181 */
    8282int
    83 fat_cluster_walk(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t firstc,
     83fat_cluster_walk(fat_bs_t *bs, devmap_handle_t devmap_handle, fat_cluster_t firstc,
    8484    fat_cluster_t *lastc, uint16_t *numc, uint16_t max_clusters)
    8585{
     
    108108                fidx = clst % (BPS(bs) / sizeof(fat_cluster_t));
    109109                /* read FAT1 */
    110                 rc = block_get(&b, dev_handle, RSCNT(bs) + fsec,
     110                rc = block_get(&b, devmap_handle, RSCNT(bs) + fsec,
    111111                    BLOCK_FLAGS_NONE);
    112112                if (rc != EOK)
     
    159159                 * when fortunately we have the last cluster number cached.
    160160                 */
    161                 return block_get(block, nodep->idx->dev_handle,
     161                return block_get(block, nodep->idx->devmap_handle,
    162162                    CLBN2PBN(bs, nodep->lastc_cached_value, bn), flags);
    163163        }
     
    173173
    174174fall_through:
    175         rc = _fat_block_get(block, bs, nodep->idx->dev_handle, firstc,
     175        rc = _fat_block_get(block, bs, nodep->idx->devmap_handle, firstc,
    176176            &currc, relbn, flags);
    177177        if (rc != EOK)
     
    192192 * @param block         Pointer to a block pointer for storing result.
    193193 * @param bs            Buffer holding the boot sector of the file system.
    194  * @param dev_handle    Device handle of the file system.
     194 * @param devmap_handle Device handle of the file system.
    195195 * @param fcl           First cluster used by the file. Can be zero if the file
    196196 *                      is empty.
     
    204204 */
    205205int
    206 _fat_block_get(block_t **block, fat_bs_t *bs, dev_handle_t dev_handle,
     206_fat_block_get(block_t **block, fat_bs_t *bs, devmap_handle_t devmap_handle,
    207207    fat_cluster_t fcl, fat_cluster_t *clp, aoff64_t bn, int flags)
    208208{
     
    221221                /* root directory special case */
    222222                assert(bn < RDS(bs));
    223                 rc = block_get(block, dev_handle,
     223                rc = block_get(block, devmap_handle,
    224224                    RSCNT(bs) + FATCNT(bs) * SF(bs) + bn, flags);
    225225                return rc;
     
    227227
    228228        max_clusters = bn / SPC(bs);
    229         rc = fat_cluster_walk(bs, dev_handle, fcl, &c, &clusters, max_clusters);
     229        rc = fat_cluster_walk(bs, devmap_handle, fcl, &c, &clusters, max_clusters);
    230230        if (rc != EOK)
    231231                return rc;
    232232        assert(clusters == max_clusters);
    233233
    234         rc = block_get(block, dev_handle, CLBN2PBN(bs, c, bn), flags);
     234        rc = block_get(block, devmap_handle, CLBN2PBN(bs, c, bn), flags);
    235235
    236236        if (clp)
     
    280280        /* zero out the initial part of the new cluster chain */
    281281        for (o = boundary; o < pos; o += BPS(bs)) {
    282                 rc = _fat_block_get(&b, bs, nodep->idx->dev_handle, mcl,
     282                rc = _fat_block_get(&b, bs, nodep->idx->devmap_handle, mcl,
    283283                    NULL, (o - boundary) / BPS(bs), BLOCK_FLAGS_NOREAD);
    284284                if (rc != EOK)
     
    297297 *
    298298 * @param bs            Buffer holding the boot sector for the file system.
    299  * @param dev_handle    Device handle for the file system.
     299 * @param devmap_handle Device handle for the file system.
    300300 * @param clst          Cluster which to get.
    301301 * @param value         Output argument holding the value of the cluster.
     
    304304 */
    305305int
    306 fat_get_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno,
     306fat_get_cluster(fat_bs_t *bs, devmap_handle_t devmap_handle, unsigned fatno,
    307307    fat_cluster_t clst, fat_cluster_t *value)
    308308{
     
    311311        int rc;
    312312
    313         rc = block_get(&b, dev_handle, RSCNT(bs) + SF(bs) * fatno +
     313        rc = block_get(&b, devmap_handle, RSCNT(bs) + SF(bs) * fatno +
    314314            (clst * sizeof(fat_cluster_t)) / BPS(bs), BLOCK_FLAGS_NONE);
    315315        if (rc != EOK)
     
    326326 *
    327327 * @param bs            Buffer holding the boot sector for the file system.
    328  * @param dev_handle    Device handle for the file system.
     328 * @param devmap_handle Device handle for the file system.
    329329 * @param fatno         Number of the FAT instance where to make the change.
    330330 * @param clst          Cluster which is to be set.
     
    334334 */
    335335int
    336 fat_set_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno,
     336fat_set_cluster(fat_bs_t *bs, devmap_handle_t devmap_handle, unsigned fatno,
    337337    fat_cluster_t clst, fat_cluster_t value)
    338338{
     
    342342
    343343        assert(fatno < FATCNT(bs));
    344         rc = block_get(&b, dev_handle, RSCNT(bs) + SF(bs) * fatno +
     344        rc = block_get(&b, devmap_handle, RSCNT(bs) + SF(bs) * fatno +
    345345            (clst * sizeof(fat_cluster_t)) / BPS(bs), BLOCK_FLAGS_NONE);
    346346        if (rc != EOK)
     
    357357 *
    358358 * @param bs            Buffer holding the boot sector of the file system.
    359  * @param dev_handle    Device handle of the file system.
     359 * @param devmap_handle Device handle of the file system.
    360360 * @param lifo          Chain of allocated clusters.
    361361 * @param nclsts        Number of clusters in the lifo chain.
     
    363363 * @return              EOK on success or a negative error code.
    364364 */
    365 int fat_alloc_shadow_clusters(fat_bs_t *bs, dev_handle_t dev_handle,
     365int fat_alloc_shadow_clusters(fat_bs_t *bs, devmap_handle_t devmap_handle,
    366366    fat_cluster_t *lifo, unsigned nclsts)
    367367{
     
    372372        for (fatno = FAT1 + 1; fatno < bs->fatcnt; fatno++) {
    373373                for (c = 0; c < nclsts; c++) {
    374                         rc = fat_set_cluster(bs, dev_handle, fatno, lifo[c],
     374                        rc = fat_set_cluster(bs, devmap_handle, fatno, lifo[c],
    375375                            c == 0 ? FAT_CLST_LAST1 : lifo[c - 1]);
    376376                        if (rc != EOK)
     
    390390 *
    391391 * @param bs            Buffer holding the boot sector of the file system.
    392  * @param dev_handle    Device handle of the file system.
     392 * @param devmap_handle Device handle of the file system.
    393393 * @param nclsts        Number of clusters to allocate.
    394394 * @param mcl           Output parameter where the first cluster in the chain
     
    400400 */
    401401int
    402 fat_alloc_clusters(fat_bs_t *bs, dev_handle_t dev_handle, unsigned nclsts,
     402fat_alloc_clusters(fat_bs_t *bs, devmap_handle_t devmap_handle, unsigned nclsts,
    403403    fat_cluster_t *mcl, fat_cluster_t *lcl)
    404404{
     
    418418        fibril_mutex_lock(&fat_alloc_lock);
    419419        for (b = 0, cl = 0; b < SF(bs); b++) {
    420                 rc = block_get(&blk, dev_handle, RSCNT(bs) + b,
     420                rc = block_get(&blk, devmap_handle, RSCNT(bs) + b,
    421421                    BLOCK_FLAGS_NONE);
    422422                if (rc != EOK)
     
    457457                                        /* update the shadow copies of FAT */
    458458                                        rc = fat_alloc_shadow_clusters(bs,
    459                                             dev_handle, lifo, nclsts);
     459                                            devmap_handle, lifo, nclsts);
    460460                                        if (rc != EOK)
    461461                                                goto error;
     
    484484         */
    485485        while (found--) {
    486                 rc = fat_set_cluster(bs, dev_handle, FAT1, lifo[found],
     486                rc = fat_set_cluster(bs, devmap_handle, FAT1, lifo[found],
    487487                    FAT_CLST_RES0);
    488488                if (rc != EOK) {
     
    499499 *
    500500 * @param bs            Buffer hodling the boot sector of the file system.
    501  * @param dev_handle    Device handle of the file system.
     501 * @param devmap_handle Device handle of the file system.
    502502 * @param firstc        First cluster in the chain which is to be freed.
    503503 *
     
    505505 */
    506506int
    507 fat_free_clusters(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t firstc)
     507fat_free_clusters(fat_bs_t *bs, devmap_handle_t devmap_handle, fat_cluster_t firstc)
    508508{
    509509        unsigned fatno;
     
    514514        while (firstc < FAT_CLST_LAST1) {
    515515                assert(firstc >= FAT_CLST_FIRST && firstc < FAT_CLST_BAD);
    516                 rc = fat_get_cluster(bs, dev_handle, FAT1, firstc, &nextc);
     516                rc = fat_get_cluster(bs, devmap_handle, FAT1, firstc, &nextc);
    517517                if (rc != EOK)
    518518                        return rc;
    519519                for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
    520                         rc = fat_set_cluster(bs, dev_handle, fatno, firstc,
     520                        rc = fat_set_cluster(bs, devmap_handle, fatno, firstc,
    521521                            FAT_CLST_RES0);
    522522                        if (rc != EOK)
     
    543543    fat_cluster_t lcl)
    544544{
    545         dev_handle_t dev_handle = nodep->idx->dev_handle;
     545        devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
    546546        fat_cluster_t lastc;
    547547        uint8_t fatno;
     
    557557                        nodep->lastc_cached_valid = false;
    558558                } else {
    559                         rc = fat_cluster_walk(bs, dev_handle, nodep->firstc,
     559                        rc = fat_cluster_walk(bs, devmap_handle, nodep->firstc,
    560560                            &lastc, NULL, (uint16_t) -1);
    561561                        if (rc != EOK)
     
    564564
    565565                for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
    566                         rc = fat_set_cluster(bs, nodep->idx->dev_handle, fatno,
     566                        rc = fat_set_cluster(bs, nodep->idx->devmap_handle, fatno,
    567567                            lastc, mcl);
    568568                        if (rc != EOK)
     
    590590{
    591591        int rc;
    592         dev_handle_t dev_handle = nodep->idx->dev_handle;
     592        devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
    593593
    594594        /*
     
    601601        if (lcl == FAT_CLST_RES0) {
    602602                /* The node will have zero size and no clusters allocated. */
    603                 rc = fat_free_clusters(bs, dev_handle, nodep->firstc);
     603                rc = fat_free_clusters(bs, devmap_handle, nodep->firstc);
    604604                if (rc != EOK)
    605605                        return rc;
     
    610610                unsigned fatno;
    611611
    612                 rc = fat_get_cluster(bs, dev_handle, FAT1, lcl, &nextc);
     612                rc = fat_get_cluster(bs, devmap_handle, FAT1, lcl, &nextc);
    613613                if (rc != EOK)
    614614                        return rc;
     
    616616                /* Terminate the cluster chain in all copies of FAT. */
    617617                for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
    618                         rc = fat_set_cluster(bs, dev_handle, fatno, lcl,
     618                        rc = fat_set_cluster(bs, devmap_handle, fatno, lcl,
    619619                            FAT_CLST_LAST1);
    620620                        if (rc != EOK)
     
    623623
    624624                /* Free all following clusters. */
    625                 rc = fat_free_clusters(bs, dev_handle, nextc);
     625                rc = fat_free_clusters(bs, devmap_handle, nextc);
    626626                if (rc != EOK)
    627627                        return rc;
     
    638638
    639639int
    640 fat_zero_cluster(struct fat_bs *bs, dev_handle_t dev_handle, fat_cluster_t c)
     640fat_zero_cluster(struct fat_bs *bs, devmap_handle_t devmap_handle, fat_cluster_t c)
    641641{
    642642        int i;
     
    645645
    646646        for (i = 0; i < SPC(bs); i++) {
    647                 rc = _fat_block_get(&b, bs, dev_handle, c, NULL, i,
     647                rc = _fat_block_get(&b, bs, devmap_handle, c, NULL, i,
    648648                    BLOCK_FLAGS_NOREAD);
    649649                if (rc != EOK)
     
    665665 * does not contain a fat file system.
    666666 */
    667 int fat_sanity_check(fat_bs_t *bs, dev_handle_t dev_handle)
     667int fat_sanity_check(fat_bs_t *bs, devmap_handle_t devmap_handle)
    668668{
    669669        fat_cluster_t e0, e1;
     
    706706
    707707        for (fat_no = 0; fat_no < bs->fatcnt; fat_no++) {
    708                 rc = fat_get_cluster(bs, dev_handle, fat_no, 0, &e0);
     708                rc = fat_get_cluster(bs, devmap_handle, fat_no, 0, &e0);
    709709                if (rc != EOK)
    710710                        return EIO;
    711711
    712                 rc = fat_get_cluster(bs, dev_handle, fat_no, 1, &e1);
     712                rc = fat_get_cluster(bs, devmap_handle, fat_no, 1, &e1);
    713713                if (rc != EOK)
    714714                        return EIO;
  • uspace/srv/fs/fat/fat_fat.h

    r51a268f r991f645  
    6161#define fat_clusters_get(numc, bs, dh, fc) \
    6262    fat_cluster_walk((bs), (dh), (fc), NULL, (numc), (uint16_t) -1)
    63 extern int fat_cluster_walk(struct fat_bs *, dev_handle_t, fat_cluster_t,
     63extern int fat_cluster_walk(struct fat_bs *, devmap_handle_t, fat_cluster_t,
    6464    fat_cluster_t *, uint16_t *, uint16_t);
    6565
    6666extern int fat_block_get(block_t **, struct fat_bs *, struct fat_node *,
    6767    aoff64_t, int);
    68 extern int _fat_block_get(block_t **, struct fat_bs *, dev_handle_t,
     68extern int _fat_block_get(block_t **, struct fat_bs *, devmap_handle_t,
    6969    fat_cluster_t, fat_cluster_t *, aoff64_t, int);
    7070
     
    7373extern int fat_chop_clusters(struct fat_bs *, struct fat_node *,
    7474    fat_cluster_t);
    75 extern int fat_alloc_clusters(struct fat_bs *, dev_handle_t, unsigned,
     75extern int fat_alloc_clusters(struct fat_bs *, devmap_handle_t, unsigned,
    7676    fat_cluster_t *, fat_cluster_t *);
    77 extern int fat_free_clusters(struct fat_bs *, dev_handle_t, fat_cluster_t);
    78 extern int fat_alloc_shadow_clusters(struct fat_bs *, dev_handle_t,
     77extern int fat_free_clusters(struct fat_bs *, devmap_handle_t, fat_cluster_t);
     78extern int fat_alloc_shadow_clusters(struct fat_bs *, devmap_handle_t,
    7979    fat_cluster_t *, unsigned);
    80 extern int fat_get_cluster(struct fat_bs *, dev_handle_t, unsigned,
     80extern int fat_get_cluster(struct fat_bs *, devmap_handle_t, unsigned,
    8181    fat_cluster_t, fat_cluster_t *);
    82 extern int fat_set_cluster(struct fat_bs *, dev_handle_t, unsigned,
     82extern int fat_set_cluster(struct fat_bs *, devmap_handle_t, unsigned,
    8383    fat_cluster_t, fat_cluster_t);
    8484extern int fat_fill_gap(struct fat_bs *, struct fat_node *, fat_cluster_t,
    8585    aoff64_t);
    86 extern int fat_zero_cluster(struct fat_bs *, dev_handle_t, fat_cluster_t);
    87 extern int fat_sanity_check(struct fat_bs *, dev_handle_t);
     86extern int fat_zero_cluster(struct fat_bs *, devmap_handle_t, fat_cluster_t);
     87extern int fat_sanity_check(struct fat_bs *, devmap_handle_t);
    8888
    8989#endif
  • uspace/srv/fs/fat/fat_idx.c

    r51a268f r991f645  
    5858typedef struct {
    5959        link_t          link;
    60         dev_handle_t    dev_handle;
     60        devmap_handle_t devmap_handle;
    6161
    6262        /** Next unassigned index. */
     
    7575static LIST_INITIALIZE(unused_head);
    7676
    77 static void unused_initialize(unused_t *u, dev_handle_t dev_handle)
     77static void unused_initialize(unused_t *u, devmap_handle_t devmap_handle)
    7878{
    7979        link_initialize(&u->link);
    80         u->dev_handle = dev_handle;
     80        u->devmap_handle = devmap_handle;
    8181        u->next = 0;
    8282        u->remaining = ((uint64_t)((fs_index_t)-1)) + 1;
     
    8484}
    8585
    86 static unused_t *unused_find(dev_handle_t dev_handle, bool lock)
     86static unused_t *unused_find(devmap_handle_t devmap_handle, bool lock)
    8787{
    8888        unused_t *u;
     
    9393        for (l = unused_head.next; l != &unused_head; l = l->next) {
    9494                u = list_get_instance(l, unused_t, link);
    95                 if (u->dev_handle == dev_handle)
     95                if (u->devmap_handle == devmap_handle)
    9696                        return u;
    9797        }
     
    106106/**
    107107 * Global hash table of all used fat_idx_t structures.
    108  * The index structures are hashed by the dev_handle, parent node's first
     108 * The index structures are hashed by the devmap_handle, parent node's first
    109109 * cluster and index within the parent directory.
    110110 */
     
    120120static hash_index_t pos_hash(unsigned long key[])
    121121{
    122         dev_handle_t dev_handle = (dev_handle_t)key[UPH_DH_KEY];
     122        devmap_handle_t devmap_handle = (devmap_handle_t)key[UPH_DH_KEY];
    123123        fat_cluster_t pfc = (fat_cluster_t)key[UPH_PFC_KEY];
    124124        unsigned pdi = (unsigned)key[UPH_PDI_KEY];
     
    140140        h |= (pdi & ((1 << (UPH_BUCKETS_LOG / 4)) - 1)) <<
    141141            (UPH_BUCKETS_LOG / 2);
    142         h |= (dev_handle & ((1 << (UPH_BUCKETS_LOG / 4)) - 1)) <<
     142        h |= (devmap_handle & ((1 << (UPH_BUCKETS_LOG / 4)) - 1)) <<
    143143            (3 * (UPH_BUCKETS_LOG / 4));
    144144
     
    148148static int pos_compare(unsigned long key[], hash_count_t keys, link_t *item)
    149149{
    150         dev_handle_t dev_handle = (dev_handle_t)key[UPH_DH_KEY];
     150        devmap_handle_t devmap_handle = (devmap_handle_t)key[UPH_DH_KEY];
    151151        fat_cluster_t pfc;
    152152        unsigned pdi;
     
    155155        switch (keys) {
    156156        case 1:
    157                 return (dev_handle == fidx->dev_handle);
     157                return (devmap_handle == fidx->devmap_handle);
    158158        case 3:
    159159                pfc = (fat_cluster_t) key[UPH_PFC_KEY];
    160160                pdi = (unsigned) key[UPH_PDI_KEY];
    161                 return (dev_handle == fidx->dev_handle) && (pfc == fidx->pfc) &&
     161                return (devmap_handle == fidx->devmap_handle) && (pfc == fidx->pfc) &&
    162162                    (pdi == fidx->pdi);
    163163        default:
     
    181181/**
    182182 * Global hash table of all used fat_idx_t structures.
    183  * The index structures are hashed by the dev_handle and index.
     183 * The index structures are hashed by the devmap_handle and index.
    184184 */
    185185static hash_table_t ui_hash;
     
    193193static hash_index_t idx_hash(unsigned long key[])
    194194{
    195         dev_handle_t dev_handle = (dev_handle_t)key[UIH_DH_KEY];
     195        devmap_handle_t devmap_handle = (devmap_handle_t)key[UIH_DH_KEY];
    196196        fs_index_t index = (fs_index_t)key[UIH_INDEX_KEY];
    197197
    198198        hash_index_t h;
    199199
    200         h = dev_handle & ((1 << (UIH_BUCKETS_LOG / 2)) - 1);
     200        h = devmap_handle & ((1 << (UIH_BUCKETS_LOG / 2)) - 1);
    201201        h |= (index & ((1 << (UIH_BUCKETS_LOG / 2)) - 1)) <<
    202202            (UIH_BUCKETS_LOG / 2);
     
    207207static int idx_compare(unsigned long key[], hash_count_t keys, link_t *item)
    208208{
    209         dev_handle_t dev_handle = (dev_handle_t)key[UIH_DH_KEY];
     209        devmap_handle_t devmap_handle = (devmap_handle_t)key[UIH_DH_KEY];
    210210        fs_index_t index;
    211211        fat_idx_t *fidx = list_get_instance(item, fat_idx_t, uih_link);
     
    213213        switch (keys) {
    214214        case 1:
    215                 return (dev_handle == fidx->dev_handle);
     215                return (devmap_handle == fidx->devmap_handle);
    216216        case 2:
    217217                index = (fs_index_t) key[UIH_INDEX_KEY];
    218                 return (dev_handle == fidx->dev_handle) &&
     218                return (devmap_handle == fidx->devmap_handle) &&
    219219                    (index == fidx->index);
    220220        default:
     
    239239
    240240/** Allocate a VFS index which is not currently in use. */
    241 static bool fat_index_alloc(dev_handle_t dev_handle, fs_index_t *index)
     241static bool fat_index_alloc(devmap_handle_t devmap_handle, fs_index_t *index)
    242242{
    243243        unused_t *u;
    244244       
    245245        assert(index);
    246         u = unused_find(dev_handle, true);
     246        u = unused_find(devmap_handle, true);
    247247        if (!u)
    248248                return false;   
     
    301301
    302302/** Free a VFS index, which is no longer in use. */
    303 static void fat_index_free(dev_handle_t dev_handle, fs_index_t index)
     303static void fat_index_free(devmap_handle_t devmap_handle, fs_index_t index)
    304304{
    305305        unused_t *u;
    306306
    307         u = unused_find(dev_handle, true);
     307        u = unused_find(devmap_handle, true);
    308308        assert(u);
    309309
     
    363363}
    364364
    365 static int fat_idx_create(fat_idx_t **fidxp, dev_handle_t dev_handle)
     365static int fat_idx_create(fat_idx_t **fidxp, devmap_handle_t devmap_handle)
    366366{
    367367        fat_idx_t *fidx;
     
    370370        if (!fidx)
    371371                return ENOMEM;
    372         if (!fat_index_alloc(dev_handle, &fidx->index)) {
     372        if (!fat_index_alloc(devmap_handle, &fidx->index)) {
    373373                free(fidx);
    374374                return ENOSPC;
     
    378378        link_initialize(&fidx->uih_link);
    379379        fibril_mutex_initialize(&fidx->lock);
    380         fidx->dev_handle = dev_handle;
     380        fidx->devmap_handle = devmap_handle;
    381381        fidx->pfc = FAT_CLST_RES0;      /* no parent yet */
    382382        fidx->pdi = 0;
     
    387387}
    388388
    389 int fat_idx_get_new(fat_idx_t **fidxp, dev_handle_t dev_handle)
     389int fat_idx_get_new(fat_idx_t **fidxp, devmap_handle_t devmap_handle)
    390390{
    391391        fat_idx_t *fidx;
     
    393393
    394394        fibril_mutex_lock(&used_lock);
    395         rc = fat_idx_create(&fidx, dev_handle);
     395        rc = fat_idx_create(&fidx, devmap_handle);
    396396        if (rc != EOK) {
    397397                fibril_mutex_unlock(&used_lock);
     
    400400               
    401401        unsigned long ikey[] = {
    402                 [UIH_DH_KEY] = dev_handle,
     402                [UIH_DH_KEY] = devmap_handle,
    403403                [UIH_INDEX_KEY] = fidx->index,
    404404        };
     
    413413
    414414fat_idx_t *
    415 fat_idx_get_by_pos(dev_handle_t dev_handle, fat_cluster_t pfc, unsigned pdi)
     415fat_idx_get_by_pos(devmap_handle_t devmap_handle, fat_cluster_t pfc, unsigned pdi)
    416416{
    417417        fat_idx_t *fidx;
    418418        link_t *l;
    419419        unsigned long pkey[] = {
    420                 [UPH_DH_KEY] = dev_handle,
     420                [UPH_DH_KEY] = devmap_handle,
    421421                [UPH_PFC_KEY] = pfc,
    422422                [UPH_PDI_KEY] = pdi,
     
    430430                int rc;
    431431
    432                 rc = fat_idx_create(&fidx, dev_handle);
     432                rc = fat_idx_create(&fidx, devmap_handle);
    433433                if (rc != EOK) {
    434434                        fibril_mutex_unlock(&used_lock);
     
    437437               
    438438                unsigned long ikey[] = {
    439                         [UIH_DH_KEY] = dev_handle,
     439                        [UIH_DH_KEY] = devmap_handle,
    440440                        [UIH_INDEX_KEY] = fidx->index,
    441441                };
     
    456456{
    457457        unsigned long pkey[] = {
    458                 [UPH_DH_KEY] = idx->dev_handle,
     458                [UPH_DH_KEY] = idx->devmap_handle,
    459459                [UPH_PFC_KEY] = idx->pfc,
    460460                [UPH_PDI_KEY] = idx->pdi,
     
    469469{
    470470        unsigned long pkey[] = {
    471                 [UPH_DH_KEY] = idx->dev_handle,
     471                [UPH_DH_KEY] = idx->devmap_handle,
    472472                [UPH_PFC_KEY] = idx->pfc,
    473473                [UPH_PDI_KEY] = idx->pdi,
     
    480480
    481481fat_idx_t *
    482 fat_idx_get_by_index(dev_handle_t dev_handle, fs_index_t index)
     482fat_idx_get_by_index(devmap_handle_t devmap_handle, fs_index_t index)
    483483{
    484484        fat_idx_t *fidx = NULL;
    485485        link_t *l;
    486486        unsigned long ikey[] = {
    487                 [UIH_DH_KEY] = dev_handle,
     487                [UIH_DH_KEY] = devmap_handle,
    488488                [UIH_INDEX_KEY] = index,
    489489        };
     
    507507{
    508508        unsigned long ikey[] = {
    509                 [UIH_DH_KEY] = idx->dev_handle,
     509                [UIH_DH_KEY] = idx->devmap_handle,
    510510                [UIH_INDEX_KEY] = idx->index,
    511511        };
    512         dev_handle_t dev_handle = idx->dev_handle;
     512        devmap_handle_t devmap_handle = idx->devmap_handle;
    513513        fs_index_t index = idx->index;
    514514
     
    524524        fibril_mutex_unlock(&used_lock);
    525525        /* Release the VFS index. */
    526         fat_index_free(dev_handle, index);
     526        fat_index_free(devmap_handle, index);
    527527        /* The index structure itself is freed in idx_remove_callback(). */
    528528}
     
    546546}
    547547
    548 int fat_idx_init_by_dev_handle(dev_handle_t dev_handle)
     548int fat_idx_init_by_devmap_handle(devmap_handle_t devmap_handle)
    549549{
    550550        unused_t *u;
     
    554554        if (!u)
    555555                return ENOMEM;
    556         unused_initialize(u, dev_handle);
     556        unused_initialize(u, devmap_handle);
    557557        fibril_mutex_lock(&unused_lock);
    558         if (!unused_find(dev_handle, false)) {
     558        if (!unused_find(devmap_handle, false)) {
    559559                list_append(&u->link, &unused_head);
    560560        } else {
     
    566566}
    567567
    568 void fat_idx_fini_by_dev_handle(dev_handle_t dev_handle)
     568void fat_idx_fini_by_devmap_handle(devmap_handle_t devmap_handle)
    569569{
    570570        unsigned long ikey[] = {
    571                 [UIH_DH_KEY] = dev_handle
     571                [UIH_DH_KEY] = devmap_handle
    572572        };
    573573        unsigned long pkey[] = {
    574                 [UPH_DH_KEY] = dev_handle
     574                [UPH_DH_KEY] = devmap_handle
    575575        };
    576576
     
    588588         * Free the unused and freed structures for this instance.
    589589         */
    590         unused_t *u = unused_find(dev_handle, true);
     590        unused_t *u = unused_find(devmap_handle, true);
    591591        assert(u);
    592592        list_remove(&u->link);
  • uspace/srv/fs/fat/fat_ops.c

    r51a268f r991f645  
    7272 * Forward declarations of FAT libfs operations.
    7373 */
    74 static int fat_root_get(fs_node_t **, dev_handle_t);
     74static int fat_root_get(fs_node_t **, devmap_handle_t);
    7575static int fat_match(fs_node_t **, fs_node_t *, const char *);
    76 static int fat_node_get(fs_node_t **, dev_handle_t, fs_index_t);
     76static int fat_node_get(fs_node_t **, devmap_handle_t, fs_index_t);
    7777static int fat_node_open(fs_node_t *);
    7878static int fat_node_put(fs_node_t *);
    79 static int fat_create_node(fs_node_t **, dev_handle_t, int);
     79static int fat_create_node(fs_node_t **, devmap_handle_t, int);
    8080static int fat_destroy_node(fs_node_t *);
    8181static int fat_link(fs_node_t *, fs_node_t *, const char *);
     
    8888static bool fat_is_directory(fs_node_t *);
    8989static bool fat_is_file(fs_node_t *node);
    90 static dev_handle_t fat_device_get(fs_node_t *node);
     90static devmap_handle_t fat_device_get(fs_node_t *node);
    9191
    9292/*
     
    120120        assert(node->dirty);
    121121
    122         bs = block_bb_get(node->idx->dev_handle);
     122        bs = block_bb_get(node->idx->devmap_handle);
    123123       
    124124        /* Read the block that contains the dentry of interest. */
    125         rc = _fat_block_get(&b, bs, node->idx->dev_handle, node->idx->pfc,
     125        rc = _fat_block_get(&b, bs, node->idx->devmap_handle, node->idx->pfc,
    126126            NULL, (node->idx->pdi * sizeof(fat_dentry_t)) / BPS(bs),
    127127            BLOCK_FLAGS_NONE);
     
    145145}
    146146
    147 static int fat_node_fini_by_dev_handle(dev_handle_t dev_handle)
     147static int fat_node_fini_by_devmap_handle(devmap_handle_t devmap_handle)
    148148{
    149149        link_t *lnk;
     
    170170                        goto restart;
    171171                }
    172                 if (nodep->idx->dev_handle != dev_handle) {
     172                if (nodep->idx->devmap_handle != devmap_handle) {
    173173                        fibril_mutex_unlock(&nodep->idx->lock);
    174174                        fibril_mutex_unlock(&nodep->lock);
     
    299299                return rc;
    300300
    301         bs = block_bb_get(idxp->dev_handle);
     301        bs = block_bb_get(idxp->devmap_handle);
    302302
    303303        /* Read the block that contains the dentry of interest. */
    304         rc = _fat_block_get(&b, bs, idxp->dev_handle, idxp->pfc, NULL,
     304        rc = _fat_block_get(&b, bs, idxp->devmap_handle, idxp->pfc, NULL,
    305305            (idxp->pdi * sizeof(fat_dentry_t)) / BPS(bs), BLOCK_FLAGS_NONE);
    306306        if (rc != EOK) {
     
    323323                 */
    324324                uint16_t clusters;
    325                 rc = fat_clusters_get(&clusters, bs, idxp->dev_handle,
     325                rc = fat_clusters_get(&clusters, bs, idxp->devmap_handle,
    326326                    uint16_t_le2host(d->firstc));
    327327                if (rc != EOK) {
     
    356356 */
    357357
    358 int fat_root_get(fs_node_t **rfn, dev_handle_t dev_handle)
    359 {
    360         return fat_node_get(rfn, dev_handle, 0);
     358int fat_root_get(fs_node_t **rfn, devmap_handle_t devmap_handle)
     359{
     360        return fat_node_get(rfn, devmap_handle, 0);
    361361}
    362362
     
    369369        unsigned blocks;
    370370        fat_dentry_t *d;
    371         dev_handle_t dev_handle;
     371        devmap_handle_t devmap_handle;
    372372        block_t *b;
    373373        int rc;
    374374
    375375        fibril_mutex_lock(&parentp->idx->lock);
    376         dev_handle = parentp->idx->dev_handle;
     376        devmap_handle = parentp->idx->devmap_handle;
    377377        fibril_mutex_unlock(&parentp->idx->lock);
    378378
    379         bs = block_bb_get(dev_handle);
     379        bs = block_bb_get(devmap_handle);
    380380        blocks = parentp->size / BPS(bs);
    381381        for (i = 0; i < blocks; i++) {
     
    402402                                /* hit */
    403403                                fat_node_t *nodep;
    404                                 fat_idx_t *idx = fat_idx_get_by_pos(dev_handle,
     404                                fat_idx_t *idx = fat_idx_get_by_pos(devmap_handle,
    405405                                    parentp->firstc, i * DPS(bs) + j);
    406406                                if (!idx) {
     
    435435
    436436/** Instantiate a FAT in-core node. */
    437 int fat_node_get(fs_node_t **rfn, dev_handle_t dev_handle, fs_index_t index)
     437int fat_node_get(fs_node_t **rfn, devmap_handle_t devmap_handle, fs_index_t index)
    438438{
    439439        fat_node_t *nodep;
     
    441441        int rc;
    442442
    443         idxp = fat_idx_get_by_index(dev_handle, index);
     443        idxp = fat_idx_get_by_index(devmap_handle, index);
    444444        if (!idxp) {
    445445                *rfn = NULL;
     
    492492}
    493493
    494 int fat_create_node(fs_node_t **rfn, dev_handle_t dev_handle, int flags)
     494int fat_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int flags)
    495495{
    496496        fat_idx_t *idxp;
     
    500500        int rc;
    501501
    502         bs = block_bb_get(dev_handle);
     502        bs = block_bb_get(devmap_handle);
    503503        if (flags & L_DIRECTORY) {
    504504                /* allocate a cluster */
    505                 rc = fat_alloc_clusters(bs, dev_handle, 1, &mcl, &lcl);
     505                rc = fat_alloc_clusters(bs, devmap_handle, 1, &mcl, &lcl);
    506506                if (rc != EOK)
    507507                        return rc;
    508508                /* populate the new cluster with unused dentries */
    509                 rc = fat_zero_cluster(bs, dev_handle, mcl);
     509                rc = fat_zero_cluster(bs, devmap_handle, mcl);
    510510                if (rc != EOK) {
    511                         (void) fat_free_clusters(bs, dev_handle, mcl);
     511                        (void) fat_free_clusters(bs, devmap_handle, mcl);
    512512                        return rc;
    513513                }
     
    516516        rc = fat_node_get_new(&nodep);
    517517        if (rc != EOK) {
    518                 (void) fat_free_clusters(bs, dev_handle, mcl);
     518                (void) fat_free_clusters(bs, devmap_handle, mcl);
    519519                return rc;
    520520        }
    521         rc = fat_idx_get_new(&idxp, dev_handle);
    522         if (rc != EOK) {
    523                 (void) fat_free_clusters(bs, dev_handle, mcl); 
     521        rc = fat_idx_get_new(&idxp, devmap_handle);
     522        if (rc != EOK) {
     523                (void) fat_free_clusters(bs, devmap_handle, mcl);       
    524524                (void) fat_node_put(FS_NODE(nodep));
    525525                return rc;
     
    570570        assert(!has_children);
    571571
    572         bs = block_bb_get(nodep->idx->dev_handle);
     572        bs = block_bb_get(nodep->idx->devmap_handle);
    573573        if (nodep->firstc != FAT_CLST_RES0) {
    574574                assert(nodep->size);
    575575                /* Free all clusters allocated to the node. */
    576                 rc = fat_free_clusters(bs, nodep->idx->dev_handle,
     576                rc = fat_free_clusters(bs, nodep->idx->devmap_handle,
    577577                    nodep->firstc);
    578578        }
     
    620620       
    621621        fibril_mutex_lock(&parentp->idx->lock);
    622         bs = block_bb_get(parentp->idx->dev_handle);
     622        bs = block_bb_get(parentp->idx->devmap_handle);
    623623
    624624        blocks = parentp->size / BPS(bs);
     
    659659                return ENOSPC;
    660660        }
    661         rc = fat_alloc_clusters(bs, parentp->idx->dev_handle, 1, &mcl, &lcl);
     661        rc = fat_alloc_clusters(bs, parentp->idx->devmap_handle, 1, &mcl, &lcl);
    662662        if (rc != EOK) {
    663663                fibril_mutex_unlock(&parentp->idx->lock);
    664664                return rc;
    665665        }
    666         rc = fat_zero_cluster(bs, parentp->idx->dev_handle, mcl);
    667         if (rc != EOK) {
    668                 (void) fat_free_clusters(bs, parentp->idx->dev_handle, mcl);
     666        rc = fat_zero_cluster(bs, parentp->idx->devmap_handle, mcl);
     667        if (rc != EOK) {
     668                (void) fat_free_clusters(bs, parentp->idx->devmap_handle, mcl);
    669669                fibril_mutex_unlock(&parentp->idx->lock);
    670670                return rc;
     
    672672        rc = fat_append_clusters(bs, parentp, mcl, lcl);
    673673        if (rc != EOK) {
    674                 (void) fat_free_clusters(bs, parentp->idx->dev_handle, mcl);
     674                (void) fat_free_clusters(bs, parentp->idx->devmap_handle, mcl);
    675675                fibril_mutex_unlock(&parentp->idx->lock);
    676676                return rc;
     
    789789        assert(childp->lnkcnt == 1);
    790790        fibril_mutex_lock(&childp->idx->lock);
    791         bs = block_bb_get(childp->idx->dev_handle);
    792 
    793         rc = _fat_block_get(&b, bs, childp->idx->dev_handle, childp->idx->pfc,
     791        bs = block_bb_get(childp->idx->devmap_handle);
     792
     793        rc = _fat_block_get(&b, bs, childp->idx->devmap_handle, childp->idx->pfc,
    794794            NULL, (childp->idx->pdi * sizeof(fat_dentry_t)) / BPS(bs),
    795795            BLOCK_FLAGS_NONE);
     
    840840       
    841841        fibril_mutex_lock(&nodep->idx->lock);
    842         bs = block_bb_get(nodep->idx->dev_handle);
     842        bs = block_bb_get(nodep->idx->devmap_handle);
    843843
    844844        blocks = nodep->size / BPS(bs);
     
    914914}
    915915
    916 dev_handle_t fat_device_get(fs_node_t *node)
     916devmap_handle_t fat_device_get(fs_node_t *node)
    917917{
    918918        return 0;
     
    946946void fat_mounted(ipc_callid_t rid, ipc_call_t *request)
    947947{
    948         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     948        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    949949        enum cache_mode cmode;
    950950        fat_bs_t *bs;
     
    968968
    969969        /* initialize libblock */
    970         rc = block_init(dev_handle, BS_SIZE);
     970        rc = block_init(devmap_handle, BS_SIZE);
    971971        if (rc != EOK) {
    972972                ipc_answer_0(rid, rc);
     
    975975
    976976        /* prepare the boot block */
    977         rc = block_bb_read(dev_handle, BS_BLOCK);
    978         if (rc != EOK) {
    979                 block_fini(dev_handle);
     977        rc = block_bb_read(devmap_handle, BS_BLOCK);
     978        if (rc != EOK) {
     979                block_fini(devmap_handle);
    980980                ipc_answer_0(rid, rc);
    981981                return;
     
    983983
    984984        /* get the buffer with the boot sector */
    985         bs = block_bb_get(dev_handle);
     985        bs = block_bb_get(devmap_handle);
    986986       
    987987        if (BPS(bs) != BS_SIZE) {
    988                 block_fini(dev_handle);
     988                block_fini(devmap_handle);
    989989                ipc_answer_0(rid, ENOTSUP);
    990990                return;
     
    992992
    993993        /* Initialize the block cache */
    994         rc = block_cache_init(dev_handle, BPS(bs), 0 /* XXX */, cmode);
    995         if (rc != EOK) {
    996                 block_fini(dev_handle);
     994        rc = block_cache_init(devmap_handle, BPS(bs), 0 /* XXX */, cmode);
     995        if (rc != EOK) {
     996                block_fini(devmap_handle);
    997997                ipc_answer_0(rid, rc);
    998998                return;
     
    10001000
    10011001        /* Do some simple sanity checks on the file system. */
    1002         rc = fat_sanity_check(bs, dev_handle);
    1003         if (rc != EOK) {
    1004                 (void) block_cache_fini(dev_handle);
    1005                 block_fini(dev_handle);
     1002        rc = fat_sanity_check(bs, devmap_handle);
     1003        if (rc != EOK) {
     1004                (void) block_cache_fini(devmap_handle);
     1005                block_fini(devmap_handle);
    10061006                ipc_answer_0(rid, rc);
    10071007                return;
    10081008        }
    10091009
    1010         rc = fat_idx_init_by_dev_handle(dev_handle);
    1011         if (rc != EOK) {
    1012                 (void) block_cache_fini(dev_handle);
    1013                 block_fini(dev_handle);
     1010        rc = fat_idx_init_by_devmap_handle(devmap_handle);
     1011        if (rc != EOK) {
     1012                (void) block_cache_fini(devmap_handle);
     1013                block_fini(devmap_handle);
    10141014                ipc_answer_0(rid, rc);
    10151015                return;
     
    10191019        fs_node_t *rfn = (fs_node_t *)malloc(sizeof(fs_node_t));
    10201020        if (!rfn) {
    1021                 (void) block_cache_fini(dev_handle);
    1022                 block_fini(dev_handle);
    1023                 fat_idx_fini_by_dev_handle(dev_handle);
     1021                (void) block_cache_fini(devmap_handle);
     1022                block_fini(devmap_handle);
     1023                fat_idx_fini_by_devmap_handle(devmap_handle);
    10241024                ipc_answer_0(rid, ENOMEM);
    10251025                return;
     
    10291029        if (!rootp) {
    10301030                free(rfn);
    1031                 (void) block_cache_fini(dev_handle);
    1032                 block_fini(dev_handle);
    1033                 fat_idx_fini_by_dev_handle(dev_handle);
     1031                (void) block_cache_fini(devmap_handle);
     1032                block_fini(devmap_handle);
     1033                fat_idx_fini_by_devmap_handle(devmap_handle);
    10341034                ipc_answer_0(rid, ENOMEM);
    10351035                return;
     
    10371037        fat_node_initialize(rootp);
    10381038
    1039         fat_idx_t *ridxp = fat_idx_get_by_pos(dev_handle, FAT_CLST_ROOTPAR, 0);
     1039        fat_idx_t *ridxp = fat_idx_get_by_pos(devmap_handle, FAT_CLST_ROOTPAR, 0);
    10401040        if (!ridxp) {
    10411041                free(rfn);
    10421042                free(rootp);
    1043                 (void) block_cache_fini(dev_handle);
    1044                 block_fini(dev_handle);
    1045                 fat_idx_fini_by_dev_handle(dev_handle);
     1043                (void) block_cache_fini(devmap_handle);
     1044                block_fini(devmap_handle);
     1045                fat_idx_fini_by_devmap_handle(devmap_handle);
    10461046                ipc_answer_0(rid, ENOMEM);
    10471047                return;
     
    10721072void fat_unmounted(ipc_callid_t rid, ipc_call_t *request)
    10731073{
    1074         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     1074        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    10751075        fs_node_t *fn;
    10761076        fat_node_t *nodep;
    10771077        int rc;
    10781078
    1079         rc = fat_root_get(&fn, dev_handle);
     1079        rc = fat_root_get(&fn, devmap_handle);
    10801080        if (rc != EOK) {
    10811081                ipc_answer_0(rid, rc);
     
    11051105         * stop using libblock for this instance.
    11061106         */
    1107         (void) fat_node_fini_by_dev_handle(dev_handle);
    1108         fat_idx_fini_by_dev_handle(dev_handle);
    1109         (void) block_cache_fini(dev_handle);
    1110         block_fini(dev_handle);
     1107        (void) fat_node_fini_by_devmap_handle(devmap_handle);
     1108        fat_idx_fini_by_devmap_handle(devmap_handle);
     1109        (void) block_cache_fini(devmap_handle);
     1110        block_fini(devmap_handle);
    11111111
    11121112        ipc_answer_0(rid, EOK);
     
    11251125void fat_read(ipc_callid_t rid, ipc_call_t *request)
    11261126{
    1127         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     1127        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    11281128        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    11291129        aoff64_t pos =
     
    11361136        int rc;
    11371137
    1138         rc = fat_node_get(&fn, dev_handle, index);
     1138        rc = fat_node_get(&fn, devmap_handle, index);
    11391139        if (rc != EOK) {
    11401140                ipc_answer_0(rid, rc);
     
    11561156        }
    11571157
    1158         bs = block_bb_get(dev_handle);
     1158        bs = block_bb_get(devmap_handle);
    11591159
    11601160        if (nodep->type == FAT_FILE) {
     
    12621262void fat_write(ipc_callid_t rid, ipc_call_t *request)
    12631263{
    1264         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     1264        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    12651265        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    12661266        aoff64_t pos =
     
    12751275        int rc;
    12761276       
    1277         rc = fat_node_get(&fn, dev_handle, index);
     1277        rc = fat_node_get(&fn, devmap_handle, index);
    12781278        if (rc != EOK) {
    12791279                ipc_answer_0(rid, rc);
     
    12951295        }
    12961296
    1297         bs = block_bb_get(dev_handle);
     1297        bs = block_bb_get(devmap_handle);
    12981298
    12991299        /*
     
    13571357                nclsts = (ROUND_UP(pos + bytes, BPC(bs)) - boundary) / BPC(bs);
    13581358                /* create an independent chain of nclsts clusters in all FATs */
    1359                 rc = fat_alloc_clusters(bs, dev_handle, nclsts, &mcl, &lcl);
     1359                rc = fat_alloc_clusters(bs, devmap_handle, nclsts, &mcl, &lcl);
    13601360                if (rc != EOK) {
    13611361                        /* could not allocate a chain of nclsts clusters */
     
    13681368                rc = fat_fill_gap(bs, nodep, mcl, pos);
    13691369                if (rc != EOK) {
    1370                         (void) fat_free_clusters(bs, dev_handle, mcl);
     1370                        (void) fat_free_clusters(bs, devmap_handle, mcl);
    13711371                        (void) fat_node_put(fn);
    13721372                        ipc_answer_0(callid, rc);
     
    13741374                        return;
    13751375                }
    1376                 rc = _fat_block_get(&b, bs, dev_handle, lcl, NULL,
     1376                rc = _fat_block_get(&b, bs, devmap_handle, lcl, NULL,
    13771377                    (pos / BPS(bs)) % SPC(bs), flags);
    13781378                if (rc != EOK) {
    1379                         (void) fat_free_clusters(bs, dev_handle, mcl);
     1379                        (void) fat_free_clusters(bs, devmap_handle, mcl);
    13801380                        (void) fat_node_put(fn);
    13811381                        ipc_answer_0(callid, rc);
     
    13881388                rc = block_put(b);
    13891389                if (rc != EOK) {
    1390                         (void) fat_free_clusters(bs, dev_handle, mcl);
     1390                        (void) fat_free_clusters(bs, devmap_handle, mcl);
    13911391                        (void) fat_node_put(fn);
    13921392                        ipc_answer_0(rid, rc);
     
    13991399                rc = fat_append_clusters(bs, nodep, mcl, lcl);
    14001400                if (rc != EOK) {
    1401                         (void) fat_free_clusters(bs, dev_handle, mcl);
     1401                        (void) fat_free_clusters(bs, devmap_handle, mcl);
    14021402                        (void) fat_node_put(fn);
    14031403                        ipc_answer_0(rid, rc);
     
    14141414void fat_truncate(ipc_callid_t rid, ipc_call_t *request)
    14151415{
    1416         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     1416        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    14171417        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    14181418        aoff64_t size =
     
    14231423        int rc;
    14241424
    1425         rc = fat_node_get(&fn, dev_handle, index);
     1425        rc = fat_node_get(&fn, devmap_handle, index);
    14261426        if (rc != EOK) {
    14271427                ipc_answer_0(rid, rc);
     
    14341434        nodep = FAT_NODE(fn);
    14351435
    1436         bs = block_bb_get(dev_handle);
     1436        bs = block_bb_get(devmap_handle);
    14371437
    14381438        if (nodep->size == size) {
     
    14611461                } else {
    14621462                        fat_cluster_t lastc;
    1463                         rc = fat_cluster_walk(bs, dev_handle, nodep->firstc,
     1463                        rc = fat_cluster_walk(bs, devmap_handle, nodep->firstc,
    14641464                            &lastc, NULL, (size - 1) / BPC(bs));
    14651465                        if (rc != EOK)
     
    14861486void fat_destroy(ipc_callid_t rid, ipc_call_t *request)
    14871487{
    1488         dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
     1488        devmap_handle_t devmap_handle = (devmap_handle_t)IPC_GET_ARG1(*request);
    14891489        fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
    14901490        fs_node_t *fn;
    14911491        int rc;
    14921492
    1493         rc = fat_node_get(&fn, dev_handle, index);
     1493        rc = fat_node_get(&fn, devmap_handle, index);
    14941494        if (rc != EOK) {
    14951495                ipc_answer_0(rid, rc);
     
    15171517void fat_sync(ipc_callid_t rid, ipc_call_t *request)
    15181518{
    1519         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     1519        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    15201520        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    15211521       
    15221522        fs_node_t *fn;
    1523         int rc = fat_node_get(&fn, dev_handle, index);
     1523        int rc = fat_node_get(&fn, devmap_handle, index);
    15241524        if (rc != EOK) {
    15251525                ipc_answer_0(rid, rc);
  • uspace/srv/fs/tmpfs/tmpfs.h

    r51a268f r991f645  
    6262        fs_node_t *bp;          /**< Back pointer to the FS node. */
    6363        fs_index_t index;       /**< TMPFS node index. */
    64         dev_handle_t dev_handle;/**< Device handle. */
     64        devmap_handle_t devmap_handle;/**< Device handle. */
    6565        link_t nh_link;         /**< Nodes hash table link. */
    6666        tmpfs_dentry_type_t type;
     
    9191extern void tmpfs_sync(ipc_callid_t, ipc_call_t *);
    9292
    93 extern bool tmpfs_restore(dev_handle_t);
     93extern bool tmpfs_restore(devmap_handle_t);
    9494
    9595#endif
  • uspace/srv/fs/tmpfs/tmpfs_dump.c

    r51a268f r991f645  
    5555
    5656static bool
    57 tmpfs_restore_recursion(dev_handle_t dev, size_t *bufpos, size_t *buflen,
     57tmpfs_restore_recursion(devmap_handle_t dev, size_t *bufpos, size_t *buflen,
    5858    aoff64_t *pos, fs_node_t *pfn)
    5959{
     
    161161}
    162162
    163 bool tmpfs_restore(dev_handle_t dev)
     163bool tmpfs_restore(devmap_handle_t dev)
    164164{
    165165        libfs_ops_t *ops = &tmpfs_libfs_ops;
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    r51a268f r991f645  
    7070/* Forward declarations of static functions. */
    7171static int tmpfs_match(fs_node_t **, fs_node_t *, const char *);
    72 static int tmpfs_node_get(fs_node_t **, dev_handle_t, fs_index_t);
     72static int tmpfs_node_get(fs_node_t **, devmap_handle_t, fs_index_t);
    7373static int tmpfs_node_open(fs_node_t *);
    7474static int tmpfs_node_put(fs_node_t *);
    75 static int tmpfs_create_node(fs_node_t **, dev_handle_t, int);
     75static int tmpfs_create_node(fs_node_t **, devmap_handle_t, int);
    7676static int tmpfs_destroy_node(fs_node_t *);
    7777static int tmpfs_link_node(fs_node_t *, fs_node_t *, const char *);
     
    7979
    8080/* Implementation of helper functions. */
    81 static int tmpfs_root_get(fs_node_t **rfn, dev_handle_t dev_handle)
    82 {
    83         return tmpfs_node_get(rfn, dev_handle, TMPFS_SOME_ROOT);
     81static int tmpfs_root_get(fs_node_t **rfn, devmap_handle_t devmap_handle)
     82{
     83        return tmpfs_node_get(rfn, devmap_handle, TMPFS_SOME_ROOT);
    8484}
    8585
     
    120120}
    121121
    122 static dev_handle_t tmpfs_device_get(fs_node_t *fn)
     122static devmap_handle_t tmpfs_device_get(fs_node_t *fn)
    123123{
    124124        return 0;
     
    165165        switch (keys) {
    166166        case 1:
    167                 return (nodep->dev_handle == key[NODES_KEY_DEV]);
     167                return (nodep->devmap_handle == key[NODES_KEY_DEV]);
    168168        case 2:
    169                 return ((nodep->dev_handle == key[NODES_KEY_DEV]) &&
     169                return ((nodep->devmap_handle == key[NODES_KEY_DEV]) &&
    170170                    (nodep->index == key[NODES_KEY_INDEX]));
    171171        default:
     
    209209        nodep->bp = NULL;
    210210        nodep->index = 0;
    211         nodep->dev_handle = 0;
     211        nodep->devmap_handle = 0;
    212212        nodep->type = TMPFS_NONE;
    213213        nodep->lnkcnt = 0;
     
    233233}
    234234
    235 static bool tmpfs_instance_init(dev_handle_t dev_handle)
     235static bool tmpfs_instance_init(devmap_handle_t devmap_handle)
    236236{
    237237        fs_node_t *rfn;
    238238        int rc;
    239239       
    240         rc = tmpfs_create_node(&rfn, dev_handle, L_DIRECTORY);
     240        rc = tmpfs_create_node(&rfn, devmap_handle, L_DIRECTORY);
    241241        if (rc != EOK || !rfn)
    242242                return false;
     
    245245}
    246246
    247 static void tmpfs_instance_done(dev_handle_t dev_handle)
     247static void tmpfs_instance_done(devmap_handle_t devmap_handle)
    248248{
    249249        unsigned long key[] = {
    250                 [NODES_KEY_DEV] = dev_handle
     250                [NODES_KEY_DEV] = devmap_handle
    251251        };
    252252        /*
     
    279279}
    280280
    281 int tmpfs_node_get(fs_node_t **rfn, dev_handle_t dev_handle, fs_index_t index)
     281int tmpfs_node_get(fs_node_t **rfn, devmap_handle_t devmap_handle, fs_index_t index)
    282282{
    283283        unsigned long key[] = {
    284                 [NODES_KEY_DEV] = dev_handle,
     284                [NODES_KEY_DEV] = devmap_handle,
    285285                [NODES_KEY_INDEX] = index
    286286        };
     
    308308}
    309309
    310 int tmpfs_create_node(fs_node_t **rfn, dev_handle_t dev_handle, int lflag)
     310int tmpfs_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int lflag)
    311311{
    312312        fs_node_t *rootfn;
     
    327327        nodep->bp->data = nodep;        /* link the FS and TMPFS nodes */
    328328
    329         rc = tmpfs_root_get(&rootfn, dev_handle);
     329        rc = tmpfs_root_get(&rootfn, devmap_handle);
    330330        assert(rc == EOK);
    331331        if (!rootfn)
     
    333333        else
    334334                nodep->index = tmpfs_next_index++;
    335         nodep->dev_handle = dev_handle;
     335        nodep->devmap_handle = devmap_handle;
    336336        if (lflag & L_DIRECTORY)
    337337                nodep->type = TMPFS_DIRECTORY;
     
    341341        /* Insert the new node into the nodes hash table. */
    342342        unsigned long key[] = {
    343                 [NODES_KEY_DEV] = nodep->dev_handle,
     343                [NODES_KEY_DEV] = nodep->devmap_handle,
    344344                [NODES_KEY_INDEX] = nodep->index
    345345        };
     
    357357
    358358        unsigned long key[] = {
    359                 [NODES_KEY_DEV] = nodep->dev_handle,
     359                [NODES_KEY_DEV] = nodep->devmap_handle,
    360360                [NODES_KEY_INDEX] = nodep->index
    361361        };
     
    442442void tmpfs_mounted(ipc_callid_t rid, ipc_call_t *request)
    443443{
    444         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     444        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    445445        fs_node_t *rootfn;
    446446        int rc;
     
    455455
    456456        /* Check if this device is not already mounted. */
    457         rc = tmpfs_root_get(&rootfn, dev_handle);
     457        rc = tmpfs_root_get(&rootfn, devmap_handle);
    458458        if ((rc == EOK) && (rootfn)) {
    459459                (void) tmpfs_node_put(rootfn);
     
    464464
    465465        /* Initialize TMPFS instance. */
    466         if (!tmpfs_instance_init(dev_handle)) {
     466        if (!tmpfs_instance_init(devmap_handle)) {
    467467                free(opts);
    468468                ipc_answer_0(rid, ENOMEM);
     
    470470        }
    471471
    472         rc = tmpfs_root_get(&rootfn, dev_handle);
     472        rc = tmpfs_root_get(&rootfn, devmap_handle);
    473473        assert(rc == EOK);
    474474        tmpfs_node_t *rootp = TMPFS_NODE(rootfn);
    475475        if (str_cmp(opts, "restore") == 0) {
    476                 if (tmpfs_restore(dev_handle))
     476                if (tmpfs_restore(devmap_handle))
    477477                        ipc_answer_3(rid, EOK, rootp->index, rootp->size,
    478478                            rootp->lnkcnt);
     
    493493void tmpfs_unmounted(ipc_callid_t rid, ipc_call_t *request)
    494494{
    495         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
    496 
    497         tmpfs_instance_done(dev_handle);
     495        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
     496
     497        tmpfs_instance_done(devmap_handle);
    498498        ipc_answer_0(rid, EOK);
    499499}
     
    511511void tmpfs_read(ipc_callid_t rid, ipc_call_t *request)
    512512{
    513         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     513        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    514514        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    515515        aoff64_t pos =
     
    521521        link_t *hlp;
    522522        unsigned long key[] = {
    523                 [NODES_KEY_DEV] = dev_handle,
     523                [NODES_KEY_DEV] = devmap_handle,
    524524                [NODES_KEY_INDEX] = index
    525525        };
     
    586586void tmpfs_write(ipc_callid_t rid, ipc_call_t *request)
    587587{
    588         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     588        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    589589        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    590590        aoff64_t pos =
     
    596596        link_t *hlp;
    597597        unsigned long key[] = {
    598                 [NODES_KEY_DEV] = dev_handle,
     598                [NODES_KEY_DEV] = devmap_handle,
    599599                [NODES_KEY_INDEX] = index
    600600        };
     
    651651void tmpfs_truncate(ipc_callid_t rid, ipc_call_t *request)
    652652{
    653         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     653        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    654654        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
    655655        aoff64_t size =
     
    660660         */
    661661        unsigned long key[] = {
    662                 [NODES_KEY_DEV] = dev_handle,
     662                [NODES_KEY_DEV] = devmap_handle,
    663663                [NODES_KEY_INDEX] = index
    664664        };
     
    704704void tmpfs_destroy(ipc_callid_t rid, ipc_call_t *request)
    705705{
    706         dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
     706        devmap_handle_t devmap_handle = (devmap_handle_t)IPC_GET_ARG1(*request);
    707707        fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
    708708        int rc;
     
    710710        link_t *hlp;
    711711        unsigned long key[] = {
    712                 [NODES_KEY_DEV] = dev_handle,
     712                [NODES_KEY_DEV] = devmap_handle,
    713713                [NODES_KEY_INDEX] = index
    714714        };
  • uspace/srv/hid/adb_mouse/adb_mouse.c

    r51a268f r991f645  
    7878        snprintf(dev_path, DEVMAP_NAME_MAXLEN, "%s/mouse", NAMESPACE);
    7979
    80         dev_handle_t dev_handle;
    81         if (devmap_device_register(dev_path, &dev_handle) != EOK) {
     80        devmap_handle_t devmap_handle;
     81        if (devmap_device_register(dev_path, &devmap_handle) != EOK) {
    8282                printf(NAME ": Unable to register device %s\n", dev_path);
    8383                return -1;
  • uspace/srv/hid/char_mouse/char_mouse.c

    r51a268f r991f645  
    134134        snprintf(dev_path, DEVMAP_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);
    135135
    136         dev_handle_t dev_handle;
    137         if (devmap_device_register(dev_path, &dev_handle) != EOK) {
     136        devmap_handle_t devmap_handle;
     137        if (devmap_device_register(dev_path, &devmap_handle) != EOK) {
    138138                printf(NAME ": Unable to register device %s\n", dev_path);
    139139                return -1;
  • uspace/srv/hid/console/console.c

    r51a268f r991f645  
    8282        size_t index;             /**< Console index */
    8383        size_t refcount;          /**< Connection reference count */
    84         dev_handle_t dev_handle;  /**< Device handle */
     84        devmap_handle_t devmap_handle;  /**< Device handle */
    8585        keybuffer_t keybuffer;    /**< Buffer for incoming keys. */
    8686        screenbuffer_t scr;       /**< Screenbuffer for saving screen
     
    571571                        continue;
    572572               
    573                 if (consoles[i].dev_handle == (dev_handle_t) IPC_GET_ARG1(*icall)) {
     573                if (consoles[i].devmap_handle == (devmap_handle_t) IPC_GET_ARG1(*icall)) {
    574574                        cons = &consoles[i];
    575575                        break;
     
    815815                        snprintf(vc, DEVMAP_NAME_MAXLEN, "%s/vc%u", NAMESPACE, i);
    816816                       
    817                         if (devmap_device_register(vc, &consoles[i].dev_handle) != EOK) {
     817                        if (devmap_device_register(vc, &consoles[i].devmap_handle) != EOK) {
    818818                                devmap_hangup_phone(DEVMAP_DRIVER);
    819819                                printf(NAME ": Unable to register device %s\n", vc);
  • uspace/srv/hid/kbd/generic/kbd.c

    r51a268f r991f645  
    250250        snprintf(kbd, DEVMAP_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);
    251251       
    252         dev_handle_t dev_handle;
    253         if (devmap_device_register(kbd, &dev_handle) != EOK) {
     252        devmap_handle_t devmap_handle;
     253        if (devmap_device_register(kbd, &devmap_handle) != EOK) {
    254254                printf("%s: Unable to register device %s\n", NAME, kbd);
    255255                return -1;
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    r51a268f r991f645  
    9999                return -1;
    100100
    101         rc = devmap_device_register(NAMESPACE "/mouse", &ts->dev_handle);
     101        rc = devmap_device_register(NAMESPACE "/mouse", &ts->devmap_handle);
    102102        if (rc != EOK) {
    103103                devmap_hangup_phone(DEVMAP_DRIVER);
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.h

    r51a268f r991f645  
    125125
    126126        /** Device handle */
    127         dev_handle_t dev_handle;
     127        devmap_handle_t devmap_handle;
    128128
    129129        /** Device/driver state */
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    r51a268f r991f645  
    143143int main(int argc, char *argv[])
    144144{
    145         dev_handle_t dev_handle;
     145        devmap_handle_t devmap_handle;
    146146        int rc;
    147147        int i;
     
    151151        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    152152                adb_dev[i].client_phone = -1;
    153                 adb_dev[i].dev_handle = 0;
     153                adb_dev[i].devmap_handle = 0;
    154154        }
    155155
     
    160160        }
    161161
    162         rc = devmap_device_register("adb/kbd", &dev_handle);
     162        rc = devmap_device_register("adb/kbd", &devmap_handle);
    163163        if (rc != EOK) {
    164164                devmap_hangup_phone(DEVMAP_DRIVER);
     
    167167        }
    168168
    169         adb_dev[2].dev_handle = dev_handle;
    170         adb_dev[8].dev_handle = dev_handle;
    171 
    172         rc = devmap_device_register("adb/mouse", &dev_handle);
     169        adb_dev[2].devmap_handle = devmap_handle;
     170        adb_dev[8].devmap_handle = devmap_handle;
     171
     172        rc = devmap_device_register("adb/mouse", &devmap_handle);
    173173        if (rc != EOK) {
    174174                devmap_hangup_phone(DEVMAP_DRIVER);
     
    177177        }
    178178
    179         adb_dev[9].dev_handle = dev_handle;
     179        adb_dev[9].devmap_handle = devmap_handle;
    180180
    181181        if (cuda_init() < 0) {
     
    196196        ipc_call_t call;
    197197        ipcarg_t method;
    198         dev_handle_t dh;
     198        devmap_handle_t dh;
    199199        int retval;
    200200        int dev_addr, i;
     
    206206        dev_addr = -1;
    207207        for (i = 0; i < ADB_MAX_ADDR; i++) {
    208                 if (adb_dev[i].dev_handle == dh)
     208                if (adb_dev[i].devmap_handle == dh)
    209209                        dev_addr = i;
    210210        }
     
    237237                         */
    238238                        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    239                                 if (adb_dev[i].dev_handle == dh) {
     239                                if (adb_dev[i].devmap_handle == dh) {
    240240                                        adb_dev[i].client_phone = IPC_GET_ARG5(call);
    241241                                }
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.h

    r51a268f r991f645  
    104104
    105105typedef struct {
    106         dev_handle_t dev_handle;
     106        devmap_handle_t devmap_handle;
    107107        int client_phone;
    108108} adb_dev_t;
  • uspace/srv/hw/char/i8042/i8042.c

    r51a268f r991f645  
    145145
    146146                snprintf(name, 16, "%s/ps2%c", NAMESPACE, dchar[i]);
    147                 rc = devmap_device_register(name, &i8042_port[i].dev_handle);
     147                rc = devmap_device_register(name, &i8042_port[i].devmap_handle);
    148148                if (rc != EOK) {
    149149                        devmap_hangup_phone(DEVMAP_DRIVER);
     
    218218        ipc_call_t call;
    219219        ipcarg_t method;
    220         dev_handle_t dh;
     220        devmap_handle_t dh;
    221221        int retval;
    222222        int dev_id, i;
     
    230230        dev_id = -1;
    231231        for (i = 0; i < MAX_DEVS; i++) {
    232                 if (i8042_port[i].dev_handle == dh)
     232                if (i8042_port[i].devmap_handle == dh)
    233233                        dev_id = i;
    234234        }
  • uspace/srv/hw/char/i8042/i8042.h

    r51a268f r991f645  
    5252/** Softstate structure, one for each serial port (primary and aux). */
    5353typedef struct {
    54         dev_handle_t dev_handle;
     54        devmap_handle_t devmap_handle;
    5555        int client_phone;
    5656} i8042_port_t;
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    r51a268f r991f645  
    9292                return -1;
    9393
    94         rc = devmap_device_register(NAMESPACE "/" NAME, &uart->dev_handle);
     94        rc = devmap_device_register(NAMESPACE "/" NAME, &uart->devmap_handle);
    9595        if (rc != EOK) {
    9696                devmap_hangup_phone(DEVMAP_DRIVER);
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.h

    r51a268f r991f645  
    8888
    8989        /** Device handle */
    90         dev_handle_t dev_handle;
     90        devmap_handle_t devmap_handle;
    9191} s3c24xx_uart_t;
    9292
  • uspace/srv/vfs/vfs.h

    r51a268f r991f645  
    6262#define VFS_PAIR \
    6363        fs_handle_t fs_handle; \
    64         dev_handle_t dev_handle;
     64        devmap_handle_t devmap_handle;
    6565
    6666/**
     
    6868 * doesn't contain any state. For a stateful structure, see vfs_node_t.
    6969 *
    70  * @note        fs_handle, dev_handle and index are meant to be returned in one
     70 * @note        fs_handle, devmap_handle and index are meant to be returned in one
    7171 *              IPC reply.
    7272 */
     
    182182extern void vfs_node_put(vfs_node_t *);
    183183extern void vfs_node_forget(vfs_node_t *);
    184 extern unsigned vfs_nodes_refcount_sum_get(fs_handle_t, dev_handle_t);
     184extern unsigned vfs_nodes_refcount_sum_get(fs_handle_t, devmap_handle_t);
    185185
    186186
  • uspace/srv/vfs/vfs_lookup.c

    r51a268f r991f645  
    163163        aid_t req = async_send_5(phone, VFS_OUT_LOOKUP, (ipcarg_t) first,
    164164            (ipcarg_t) (first + len - 1) % PLB_SIZE,
    165             (ipcarg_t) root->dev_handle, (ipcarg_t) lflag, (ipcarg_t) index,
     165            (ipcarg_t) root->devmap_handle, (ipcarg_t) lflag, (ipcarg_t) index,
    166166            &answer);
    167167       
     
    183183       
    184184        result->triplet.fs_handle = (fs_handle_t) rc;
    185         result->triplet.dev_handle = (dev_handle_t) IPC_GET_ARG1(answer);
     185        result->triplet.devmap_handle = (devmap_handle_t) IPC_GET_ARG1(answer);
    186186        result->triplet.index = (fs_index_t) IPC_GET_ARG2(answer);
    187187        result->size =
     
    210210        ipc_call_t answer;
    211211        aid_t req = async_send_2(phone, VFS_OUT_OPEN_NODE,
    212             (ipcarg_t) result->triplet.dev_handle,
     212            (ipcarg_t) result->triplet.devmap_handle,
    213213            (ipcarg_t) result->triplet.index, &answer);
    214214       
  • uspace/srv/vfs/vfs_node.c

    r51a268f r991f645  
    113113                unsigned long key[] = {
    114114                        [KEY_FS_HANDLE] = node->fs_handle,
    115                         [KEY_DEV_HANDLE] = node->dev_handle,
     115                        [KEY_DEV_HANDLE] = node->devmap_handle,
    116116                        [KEY_INDEX] = node->index
    117117                };
     
    131131                ipcarg_t rc;
    132132                rc = async_req_2_0(phone, VFS_OUT_DESTROY,
    133                     (ipcarg_t)node->dev_handle, (ipcarg_t)node->index);
     133                    (ipcarg_t)node->devmap_handle, (ipcarg_t)node->index);
    134134                assert(rc == EOK);
    135135                vfs_release_phone(node->fs_handle, phone);
     
    151151        unsigned long key[] = {
    152152                [KEY_FS_HANDLE] = node->fs_handle,
    153                 [KEY_DEV_HANDLE] = node->dev_handle,
     153                [KEY_DEV_HANDLE] = node->devmap_handle,
    154154                [KEY_INDEX] = node->index
    155155        };
     
    175175        unsigned long key[] = {
    176176                [KEY_FS_HANDLE] = result->triplet.fs_handle,
    177                 [KEY_DEV_HANDLE] = result->triplet.dev_handle,
     177                [KEY_DEV_HANDLE] = result->triplet.devmap_handle,
    178178                [KEY_INDEX] = result->triplet.index
    179179        };
     
    191191                memset(node, 0, sizeof(vfs_node_t));
    192192                node->fs_handle = result->triplet.fs_handle;
    193                 node->dev_handle = result->triplet.dev_handle;
     193                node->devmap_handle = result->triplet.devmap_handle;
    194194                node->index = result->triplet.index;
    195195                node->size = result->size;
     
    243243        vfs_node_t *node = hash_table_get_instance(item, vfs_node_t, nh_link);
    244244        return (node->fs_handle == (fs_handle_t) key[KEY_FS_HANDLE]) &&
    245             (node->dev_handle == key[KEY_DEV_HANDLE]) &&
     245            (node->devmap_handle == key[KEY_DEV_HANDLE]) &&
    246246            (node->index == key[KEY_INDEX]);
    247247}
     
    255255        unsigned refcnt;
    256256        fs_handle_t fs_handle;
    257         dev_handle_t dev_handle;
     257        devmap_handle_t devmap_handle;
    258258};
    259259
     
    264264
    265265        if ((node->fs_handle == rd->fs_handle) &&
    266             (node->dev_handle == rd->dev_handle))
     266            (node->devmap_handle == rd->devmap_handle))
    267267                rd->refcnt += node->refcnt;
    268268}
    269269
    270270unsigned
    271 vfs_nodes_refcount_sum_get(fs_handle_t fs_handle, dev_handle_t dev_handle)
     271vfs_nodes_refcount_sum_get(fs_handle_t fs_handle, devmap_handle_t devmap_handle)
    272272{
    273273        struct refcnt_data rd = {
    274274                .refcnt = 0,
    275275                .fs_handle = fs_handle,
    276                 .dev_handle = dev_handle
     276                .devmap_handle = devmap_handle
    277277        };
    278278
  • uspace/srv/vfs/vfs_ops.c

    r51a268f r991f645  
    5555
    5656/* Forward declarations of static functions. */
    57 static int vfs_truncate_internal(fs_handle_t, dev_handle_t, fs_index_t, aoff64_t);
     57static int vfs_truncate_internal(fs_handle_t, devmap_handle_t, fs_index_t, aoff64_t);
    5858
    5959/**
     
    6565vfs_pair_t rootfs = {
    6666        .fs_handle = 0,
    67         .dev_handle = 0
     67        .devmap_handle = 0
    6868};
    6969
    70 static void vfs_mount_internal(ipc_callid_t rid, dev_handle_t dev_handle,
     70static void vfs_mount_internal(ipc_callid_t rid, devmap_handle_t devmap_handle,
    7171    fs_handle_t fs_handle, char *mp, char *opts)
    7272{
     
    125125                        phone = vfs_grab_phone(fs_handle);
    126126                        msg = async_send_1(phone, VFS_OUT_MOUNTED,
    127                             (ipcarg_t) dev_handle, &answer);
     127                            (ipcarg_t) devmap_handle, &answer);
    128128                        /* send the mount options */
    129129                        rc = async_data_write_start(phone, (void *)opts,
     
    150150                       
    151151                        mr_res.triplet.fs_handle = fs_handle;
    152                         mr_res.triplet.dev_handle = dev_handle;
     152                        mr_res.triplet.devmap_handle = devmap_handle;
    153153                        mr_res.triplet.index = rindex;
    154154                        mr_res.size = rsize;
     
    157157                       
    158158                        rootfs.fs_handle = fs_handle;
    159                         rootfs.dev_handle = dev_handle;
     159                        rootfs.devmap_handle = devmap_handle;
    160160                       
    161161                        /* Add reference to the mounted root. */
     
    187187        phone = vfs_grab_phone(mp_res.triplet.fs_handle);
    188188        msg = async_send_4(phone, VFS_OUT_MOUNT,
    189             (ipcarg_t) mp_res.triplet.dev_handle,
     189            (ipcarg_t) mp_res.triplet.devmap_handle,
    190190            (ipcarg_t) mp_res.triplet.index,
    191191            (ipcarg_t) fs_handle,
    192             (ipcarg_t) dev_handle, &answer);
     192            (ipcarg_t) devmap_handle, &answer);
    193193       
    194194        /* send connection */
     
    229229       
    230230                mr_res.triplet.fs_handle = fs_handle;
    231                 mr_res.triplet.dev_handle = dev_handle;
     231                mr_res.triplet.devmap_handle = devmap_handle;
    232232                mr_res.triplet.index = rindex;
    233233                mr_res.size = rsize;
     
    255255         * in the request.
    256256         */
    257         dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     257        devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
    258258       
    259259        /*
     
    343343       
    344344        /* Do the mount */
    345         vfs_mount_internal(rid, dev_handle, fs_handle, mp, opts);
     345        vfs_mount_internal(rid, devmap_handle, fs_handle, mp, opts);
    346346        free(mp);
    347347        free(fs_name);
     
    402402         */
    403403        if (vfs_nodes_refcount_sum_get(mr_node->fs_handle,
    404             mr_node->dev_handle) != 2) {
     404            mr_node->devmap_handle) != 2) {
    405405                fibril_rwlock_write_unlock(&namespace_rwlock);
    406406                vfs_node_put(mr_node);
     
    422422                phone = vfs_grab_phone(mr_node->fs_handle);
    423423                rc = async_req_1_0(phone, VFS_OUT_UNMOUNTED,
    424                     mr_node->dev_handle);
     424                    mr_node->devmap_handle);
    425425                vfs_release_phone(mr_node->fs_handle, phone);
    426426                if (rc != EOK) {
     
    431431                }
    432432                rootfs.fs_handle = 0;
    433                 rootfs.dev_handle = 0;
     433                rootfs.devmap_handle = 0;
    434434        } else {
    435435
     
    458458
    459459                phone = vfs_grab_phone(mp_node->fs_handle);
    460                 rc = async_req_2_0(phone, VFS_OUT_UNMOUNT, mp_node->dev_handle,
     460                rc = async_req_2_0(phone, VFS_OUT_UNMOUNT, mp_node->devmap_handle,
    461461                    mp_node->index);
    462462                vfs_release_phone(mp_node->fs_handle, phone);
     
    569569                if (node->size) {
    570570                        rc = vfs_truncate_internal(node->fs_handle,
    571                             node->dev_handle, node->index, 0);
     571                            node->devmap_handle, node->index, 0);
    572572                        if (rc) {
    573573                                fibril_rwlock_write_unlock(&node->contents_rwlock);
     
    626626       
    627627        lr.triplet.fs_handle = IPC_GET_ARG1(*request);
    628         lr.triplet.dev_handle = IPC_GET_ARG2(*request);
     628        lr.triplet.devmap_handle = IPC_GET_ARG2(*request);
    629629        lr.triplet.index = IPC_GET_ARG3(*request);
    630630        int oflag = IPC_GET_ARG4(*request);
     
    647647                if (node->size) {
    648648                        rc = vfs_truncate_internal(node->fs_handle,
    649                             node->dev_handle, node->index, 0);
     649                            node->devmap_handle, node->index, 0);
    650650                        if (rc) {
    651651                                fibril_rwlock_write_unlock(&node->contents_rwlock);
     
    709709        aid_t msg;
    710710        ipc_call_t answer;
    711         msg = async_send_2(fs_phone, VFS_OUT_SYNC, file->node->dev_handle,
     711        msg = async_send_2(fs_phone, VFS_OUT_SYNC, file->node->devmap_handle,
    712712            file->node->index, &answer);
    713713
     
    740740                aid_t msg;
    741741                ipc_call_t answer;
    742                 msg = async_send_2(fs_phone, VFS_OUT_CLOSE, file->node->dev_handle,
     742                msg = async_send_2(fs_phone, VFS_OUT_CLOSE, file->node->devmap_handle,
    743743                    file->node->index, &answer);
    744744               
     
    838838               
    839839                rc = async_data_read_forward_3_1(fs_phone, VFS_OUT_READ,
    840                     file->node->dev_handle, file->node->index, file->pos,
     840                    file->node->devmap_handle, file->node->index, file->pos,
    841841                    &answer);
    842842        } else {
    843843                rc = async_data_write_forward_3_1(fs_phone, VFS_OUT_WRITE,
    844                     file->node->dev_handle, file->node->index, file->pos,
     844                    file->node->devmap_handle, file->node->index, file->pos,
    845845                    &answer);
    846846        }
     
    961961}
    962962
    963 int vfs_truncate_internal(fs_handle_t fs_handle, dev_handle_t dev_handle,
     963int vfs_truncate_internal(fs_handle_t fs_handle, devmap_handle_t devmap_handle,
    964964    fs_index_t index, aoff64_t size)
    965965{
     
    968968       
    969969        fs_phone = vfs_grab_phone(fs_handle);
    970         rc = async_req_4_0(fs_phone, VFS_OUT_TRUNCATE, (ipcarg_t) dev_handle,
     970        rc = async_req_4_0(fs_phone, VFS_OUT_TRUNCATE, (ipcarg_t) devmap_handle,
    971971            (ipcarg_t) index, LOWER32(size), UPPER32(size));
    972972        vfs_release_phone(fs_handle, fs_phone);
     
    990990        fibril_rwlock_write_lock(&file->node->contents_rwlock);
    991991        rc = vfs_truncate_internal(file->node->fs_handle,
    992             file->node->dev_handle, file->node->index, size);
     992            file->node->devmap_handle, file->node->index, size);
    993993        if (rc == EOK)
    994994                file->node->size = size;
     
    10221022       
    10231023        aid_t msg;
    1024         msg = async_send_3(fs_phone, VFS_OUT_STAT, file->node->dev_handle,
     1024        msg = async_send_3(fs_phone, VFS_OUT_STAT, file->node->devmap_handle,
    10251025            file->node->index, true, NULL);
    10261026        ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);
     
    10711071        int fs_phone = vfs_grab_phone(node->fs_handle);
    10721072        aid_t msg;
    1073         msg = async_send_3(fs_phone, VFS_OUT_STAT, node->dev_handle,
     1073        msg = async_send_3(fs_phone, VFS_OUT_STAT, node->devmap_handle,
    10741074            node->index, false, NULL);
    10751075        ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);
     
    12451245        /* Check whether linking to the same file system instance. */
    12461246        if ((old_node->fs_handle != new_par_lr.triplet.fs_handle) ||
    1247             (old_node->dev_handle != new_par_lr.triplet.dev_handle)) {
     1247            (old_node->devmap_handle != new_par_lr.triplet.devmap_handle)) {
    12481248                fibril_rwlock_write_unlock(&namespace_rwlock);
    12491249                ipc_answer_0(rid, EXDEV);       /* different file systems */
Note: See TracChangeset for help on using the changeset viewer.