Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision db4ec8d433d5a57e9661bceeab3b1ffff2adb1ff)
+++ uspace/srv/fs/fat/fat_fat.c	(revision fdbc3ff84ed86b1d20bebbe6c6235ecc5954f606)
@@ -70,5 +70,5 @@
  *
  * @param bs		Buffer holding the boot sector for the file.
- * @param dev_handle	Device handle of the device with the file.
+ * @param devmap_handle	Device handle of the device with the file.
  * @param firstc	First cluster to start the walk with.
  * @param lastc		If non-NULL, output argument hodling the last cluster
@@ -81,5 +81,5 @@
  */
 int 
-fat_cluster_walk(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t firstc,
+fat_cluster_walk(fat_bs_t *bs, devmap_handle_t devmap_handle, fat_cluster_t firstc,
     fat_cluster_t *lastc, uint16_t *numc, uint16_t max_clusters)
 {
@@ -108,5 +108,5 @@
 		fidx = clst % (BPS(bs) / sizeof(fat_cluster_t));
 		/* read FAT1 */
-		rc = block_get(&b, dev_handle, RSCNT(bs) + fsec,
+		rc = block_get(&b, devmap_handle, RSCNT(bs) + fsec,
 		    BLOCK_FLAGS_NONE);
 		if (rc != EOK)
@@ -159,5 +159,5 @@
 		 * when fortunately we have the last cluster number cached.
 		 */
-		return block_get(block, nodep->idx->dev_handle,
+		return block_get(block, nodep->idx->devmap_handle,
 		    CLBN2PBN(bs, nodep->lastc_cached_value, bn), flags);
 	}
@@ -173,5 +173,5 @@
 
 fall_through:
-	rc = _fat_block_get(block, bs, nodep->idx->dev_handle, firstc,
+	rc = _fat_block_get(block, bs, nodep->idx->devmap_handle, firstc,
 	    &currc, relbn, flags);
 	if (rc != EOK)
@@ -192,5 +192,5 @@
  * @param block		Pointer to a block pointer for storing result.
  * @param bs		Buffer holding the boot sector of the file system.
- * @param dev_handle	Device handle of the file system.
+ * @param devmap_handle	Device handle of the file system.
  * @param fcl		First cluster used by the file. Can be zero if the file
  *			is empty.
@@ -204,5 +204,5 @@
  */
 int
-_fat_block_get(block_t **block, fat_bs_t *bs, dev_handle_t dev_handle,
+_fat_block_get(block_t **block, fat_bs_t *bs, devmap_handle_t devmap_handle,
     fat_cluster_t fcl, fat_cluster_t *clp, aoff64_t bn, int flags)
 {
@@ -221,5 +221,5 @@
 		/* root directory special case */
 		assert(bn < RDS(bs));
-		rc = block_get(block, dev_handle,
+		rc = block_get(block, devmap_handle,
 		    RSCNT(bs) + FATCNT(bs) * SF(bs) + bn, flags);
 		return rc;
@@ -227,10 +227,10 @@
 
 	max_clusters = bn / SPC(bs);
-	rc = fat_cluster_walk(bs, dev_handle, fcl, &c, &clusters, max_clusters);
+	rc = fat_cluster_walk(bs, devmap_handle, fcl, &c, &clusters, max_clusters);
 	if (rc != EOK)
 		return rc;
 	assert(clusters == max_clusters);
 
-	rc = block_get(block, dev_handle, CLBN2PBN(bs, c, bn), flags);
+	rc = block_get(block, devmap_handle, CLBN2PBN(bs, c, bn), flags);
 
 	if (clp)
@@ -280,5 +280,5 @@
 	/* zero out the initial part of the new cluster chain */
 	for (o = boundary; o < pos; o += BPS(bs)) {
-		rc = _fat_block_get(&b, bs, nodep->idx->dev_handle, mcl,
+		rc = _fat_block_get(&b, bs, nodep->idx->devmap_handle, mcl,
 		    NULL, (o - boundary) / BPS(bs), BLOCK_FLAGS_NOREAD);
 		if (rc != EOK)
@@ -297,5 +297,5 @@
  *
  * @param bs		Buffer holding the boot sector for the file system.
- * @param dev_handle	Device handle for the file system.
+ * @param devmap_handle	Device handle for the file system.
  * @param clst		Cluster which to get.
  * @param value		Output argument holding the value of the cluster.
@@ -304,5 +304,5 @@
  */
 int
-fat_get_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno,
+fat_get_cluster(fat_bs_t *bs, devmap_handle_t devmap_handle, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t *value)
 {
@@ -311,5 +311,5 @@
 	int rc;
 
-	rc = block_get(&b, dev_handle, RSCNT(bs) + SF(bs) * fatno +
+	rc = block_get(&b, devmap_handle, RSCNT(bs) + SF(bs) * fatno +
 	    (clst * sizeof(fat_cluster_t)) / BPS(bs), BLOCK_FLAGS_NONE);
 	if (rc != EOK)
@@ -326,5 +326,5 @@
  *
  * @param bs		Buffer holding the boot sector for the file system.
- * @param dev_handle	Device handle for the file system.
+ * @param devmap_handle	Device handle for the file system.
  * @param fatno		Number of the FAT instance where to make the change.
  * @param clst		Cluster which is to be set.
@@ -334,5 +334,5 @@
  */
 int
-fat_set_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno,
+fat_set_cluster(fat_bs_t *bs, devmap_handle_t devmap_handle, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t value)
 {
@@ -342,5 +342,5 @@
 
 	assert(fatno < FATCNT(bs));
-	rc = block_get(&b, dev_handle, RSCNT(bs) + SF(bs) * fatno +
+	rc = block_get(&b, devmap_handle, RSCNT(bs) + SF(bs) * fatno +
 	    (clst * sizeof(fat_cluster_t)) / BPS(bs), BLOCK_FLAGS_NONE);
 	if (rc != EOK)
@@ -357,5 +357,5 @@
  *
  * @param bs		Buffer holding the boot sector of the file system.
- * @param dev_handle	Device handle of the file system.
+ * @param devmap_handle	Device handle of the file system.
  * @param lifo		Chain of allocated clusters.
  * @param nclsts	Number of clusters in the lifo chain.
@@ -363,5 +363,5 @@
  * @return		EOK on success or a negative error code.
  */
-int fat_alloc_shadow_clusters(fat_bs_t *bs, dev_handle_t dev_handle,
+int fat_alloc_shadow_clusters(fat_bs_t *bs, devmap_handle_t devmap_handle,
     fat_cluster_t *lifo, unsigned nclsts)
 {
@@ -372,5 +372,5 @@
 	for (fatno = FAT1 + 1; fatno < bs->fatcnt; fatno++) {
 		for (c = 0; c < nclsts; c++) {
-			rc = fat_set_cluster(bs, dev_handle, fatno, lifo[c],
+			rc = fat_set_cluster(bs, devmap_handle, fatno, lifo[c],
 			    c == 0 ? FAT_CLST_LAST1 : lifo[c - 1]);
 			if (rc != EOK)
@@ -390,5 +390,5 @@
  *
  * @param bs		Buffer holding the boot sector of the file system.
- * @param dev_handle	Device handle of the file system.
+ * @param devmap_handle	Device handle of the file system.
  * @param nclsts	Number of clusters to allocate.
  * @param mcl		Output parameter where the first cluster in the chain
@@ -400,5 +400,5 @@
  */
 int
-fat_alloc_clusters(fat_bs_t *bs, dev_handle_t dev_handle, unsigned nclsts,
+fat_alloc_clusters(fat_bs_t *bs, devmap_handle_t devmap_handle, unsigned nclsts,
     fat_cluster_t *mcl, fat_cluster_t *lcl)
 {
@@ -418,5 +418,5 @@
 	fibril_mutex_lock(&fat_alloc_lock);
 	for (b = 0, cl = 0; b < SF(bs); b++) {
-		rc = block_get(&blk, dev_handle, RSCNT(bs) + b,
+		rc = block_get(&blk, devmap_handle, RSCNT(bs) + b,
 		    BLOCK_FLAGS_NONE);
 		if (rc != EOK)
@@ -457,5 +457,5 @@
 					/* update the shadow copies of FAT */
 					rc = fat_alloc_shadow_clusters(bs,
-					    dev_handle, lifo, nclsts);
+					    devmap_handle, lifo, nclsts);
 					if (rc != EOK)
 						goto error;
@@ -484,5 +484,5 @@
 	 */
 	while (found--) {
-		rc = fat_set_cluster(bs, dev_handle, FAT1, lifo[found],
+		rc = fat_set_cluster(bs, devmap_handle, FAT1, lifo[found],
 		    FAT_CLST_RES0);
 		if (rc != EOK) {
@@ -499,5 +499,5 @@
  *
  * @param bs		Buffer hodling the boot sector of the file system.
- * @param dev_handle	Device handle of the file system.
+ * @param devmap_handle	Device handle of the file system.
  * @param firstc	First cluster in the chain which is to be freed.
  *
@@ -505,5 +505,5 @@
  */
 int
-fat_free_clusters(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t firstc)
+fat_free_clusters(fat_bs_t *bs, devmap_handle_t devmap_handle, fat_cluster_t firstc)
 {
 	unsigned fatno;
@@ -514,9 +514,9 @@
 	while (firstc < FAT_CLST_LAST1) {
 		assert(firstc >= FAT_CLST_FIRST && firstc < FAT_CLST_BAD);
-		rc = fat_get_cluster(bs, dev_handle, FAT1, firstc, &nextc);
+		rc = fat_get_cluster(bs, devmap_handle, FAT1, firstc, &nextc);
 		if (rc != EOK)
 			return rc;
 		for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
-			rc = fat_set_cluster(bs, dev_handle, fatno, firstc,
+			rc = fat_set_cluster(bs, devmap_handle, fatno, firstc,
 			    FAT_CLST_RES0);
 			if (rc != EOK)
@@ -543,5 +543,5 @@
     fat_cluster_t lcl)
 {
-	dev_handle_t dev_handle = nodep->idx->dev_handle;
+	devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
 	fat_cluster_t lastc;
 	uint8_t fatno;
@@ -557,5 +557,5 @@
 			nodep->lastc_cached_valid = false;
 		} else {
-			rc = fat_cluster_walk(bs, dev_handle, nodep->firstc,
+			rc = fat_cluster_walk(bs, devmap_handle, nodep->firstc,
 			    &lastc, NULL, (uint16_t) -1);
 			if (rc != EOK)
@@ -564,5 +564,5 @@
 
 		for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
-			rc = fat_set_cluster(bs, nodep->idx->dev_handle, fatno,
+			rc = fat_set_cluster(bs, nodep->idx->devmap_handle, fatno,
 			    lastc, mcl);
 			if (rc != EOK)
@@ -590,5 +590,5 @@
 {
 	int rc;
-	dev_handle_t dev_handle = nodep->idx->dev_handle;
+	devmap_handle_t devmap_handle = nodep->idx->devmap_handle;
 
 	/*
@@ -601,5 +601,5 @@
 	if (lcl == FAT_CLST_RES0) {
 		/* The node will have zero size and no clusters allocated. */
-		rc = fat_free_clusters(bs, dev_handle, nodep->firstc);
+		rc = fat_free_clusters(bs, devmap_handle, nodep->firstc);
 		if (rc != EOK)
 			return rc;
@@ -610,5 +610,5 @@
 		unsigned fatno;
 
-		rc = fat_get_cluster(bs, dev_handle, FAT1, lcl, &nextc);
+		rc = fat_get_cluster(bs, devmap_handle, FAT1, lcl, &nextc);
 		if (rc != EOK)
 			return rc;
@@ -616,5 +616,5 @@
 		/* Terminate the cluster chain in all copies of FAT. */
 		for (fatno = FAT1; fatno < bs->fatcnt; fatno++) {
-			rc = fat_set_cluster(bs, dev_handle, fatno, lcl,
+			rc = fat_set_cluster(bs, devmap_handle, fatno, lcl,
 			    FAT_CLST_LAST1);
 			if (rc != EOK)
@@ -623,5 +623,5 @@
 
 		/* Free all following clusters. */
-		rc = fat_free_clusters(bs, dev_handle, nextc);
+		rc = fat_free_clusters(bs, devmap_handle, nextc);
 		if (rc != EOK)
 			return rc;
@@ -638,5 +638,5 @@
 
 int
-fat_zero_cluster(struct fat_bs *bs, dev_handle_t dev_handle, fat_cluster_t c)
+fat_zero_cluster(struct fat_bs *bs, devmap_handle_t devmap_handle, fat_cluster_t c)
 {
 	int i;
@@ -645,5 +645,5 @@
 
 	for (i = 0; i < SPC(bs); i++) {
-		rc = _fat_block_get(&b, bs, dev_handle, c, NULL, i,
+		rc = _fat_block_get(&b, bs, devmap_handle, c, NULL, i,
 		    BLOCK_FLAGS_NOREAD);
 		if (rc != EOK)
@@ -665,5 +665,5 @@
  * does not contain a fat file system.
  */
-int fat_sanity_check(fat_bs_t *bs, dev_handle_t dev_handle)
+int fat_sanity_check(fat_bs_t *bs, devmap_handle_t devmap_handle)
 {
 	fat_cluster_t e0, e1;
@@ -706,9 +706,9 @@
 
 	for (fat_no = 0; fat_no < bs->fatcnt; fat_no++) {
-		rc = fat_get_cluster(bs, dev_handle, fat_no, 0, &e0);
+		rc = fat_get_cluster(bs, devmap_handle, fat_no, 0, &e0);
 		if (rc != EOK)
 			return EIO;
 
-		rc = fat_get_cluster(bs, dev_handle, fat_no, 1, &e1);
+		rc = fat_get_cluster(bs, devmap_handle, fat_no, 1, &e1);
 		if (rc != EOK)
 			return EIO;
