Index: uspace/srv/fs/exfat/exfat_ops.c
===================================================================
--- uspace/srv/fs/exfat/exfat_ops.c	(revision 1f1d96ab7398f42c99c84befaa06780aaf557453)
+++ uspace/srv/fs/exfat/exfat_ops.c	(revision f01fea303fd1981c040462f528676513e3857216)
@@ -62,5 +62,5 @@
 #define EXFAT_NODE(node)	((node) ? (exfat_node_t *) (node)->data : NULL)
 #define FS_NODE(node)	((node) ? (node)->bp : NULL)
-
+#define DPS(bs) (BPS((bs)) / sizeof(exfat_dentry_t))
 
 /** Mutex protecting the list of cached free FAT nodes. */
@@ -259,6 +259,6 @@
 {
 	block_t *b=NULL;
-	//exfat_bs_t *bs;
-	//exfat_dentry_t *d;
+	exfat_bs_t *bs;
+	exfat_dentry_t *d;
 	exfat_node_t *nodep = NULL;
 	int rc;
@@ -290,37 +290,48 @@
 		return rc;
 
-	//bs = block_bb_get(idxp->devmap_handle);
-
-	/* Access to exFAT directory and read two entries:
-	 * file entry and stream entry 
-	 */
-	/*
-	exfat_directory_t di;
-	exfat_dentry_t *de;
-	exfat_directory_open(&di, ???);
-	exfat_directory_seek(&di, idxp->pdi);
-	exfat_directory_get(&di, &de); 
-
-	switch (exfat_classify_dentry(de)) {
+	bs = block_bb_get(idxp->devmap_handle);
+
+	rc = exfat_block_get_by_clst(&b, bs, idxp->devmap_handle, 
+	    idxp->parent_fragmented, idxp->pfc, NULL, 
+	    (idxp->pdi * sizeof(exfat_dentry_t)) / BPS(bs), BLOCK_FLAGS_NONE);
+	if (rc != EOK) {
+		(void) exfat_node_put(FS_NODE(nodep));
+		return rc;
+	}
+
+	d = ((exfat_dentry_t *)b->data) + (idxp->pdi % DPS(bs));
+	switch (exfat_classify_dentry(d)) {
 	case EXFAT_DENTRY_FILE:
-		nodep->type = (de->file.attr & EXFAT_ATTR_SUBDIR)? 
+		nodep->type = (d->file.attr & EXFAT_ATTR_SUBDIR)? 
 		    EXFAT_DIRECTORY : EXFAT_FILE;
-		exfat_directory_next(&di);
-		exfat_directory_get(&di, &de);
-		nodep->firtsc = de->stream.firstc;
-		nodep->size = de->stream.data_size;
-		nodep->fragmented = (de->stream.flags & 0x02) == 0;
+		rc = block_put(b);
+		if (rc != EOK) {
+			(void) exfat_node_put(FS_NODE(nodep));
+			return rc;
+		}
+		rc = exfat_block_get_by_clst(&b, bs, idxp->devmap_handle, 
+			idxp->parent_fragmented, idxp->pfc, NULL, 
+			((idxp->pdi+1) * sizeof(exfat_dentry_t)) / BPS(bs), BLOCK_FLAGS_NONE);
+		if (rc != EOK) {
+			(void) exfat_node_put(FS_NODE(nodep));
+			return rc;
+		}
+		d = ((exfat_dentry_t *)b->data) + ((idxp->pdi+1) % DPS(bs));
+		
+		nodep->firstc = d->stream.firstc;
+		nodep->size = d->stream.data_size;
+		nodep->fragmented = (d->stream.flags & 0x02) == 0;
 		break;
 	case EXFAT_DENTRY_BITMAP:
 		nodep->type = EXFAT_BITMAP;
-		nodep->firstc = de->bitmap.firstc;
-		nodep->size = de->bitmap.size;
-		nodep->fragmented = false;
+		nodep->firstc = d->bitmap.firstc;
+		nodep->size = d->bitmap.size;
+		nodep->fragmented = true;
 		break;
 	case EXFAT_DENTRY_UCTABLE:
 		nodep->type = EXFAT_UCTABLE;
-		nodep->firstc = de->uctable.firstc;
-		nodep->size = de->uctable.size;
-		nodep->fragmented = false;
+		nodep->firstc = d->uctable.firstc;
+		nodep->size = d->uctable.size;
+		nodep->fragmented = true;
 		break;
 	default:
@@ -333,20 +344,7 @@
 	case EXFAT_DENTRY_NAME:
 		(void) block_put(b);
-		(void) fat_node_put(FS_NODE(nodep));
+		(void) exfat_node_put(FS_NODE(nodep));
 		return ENOENT;
 	}
-	*/
-
-	/* Read the block that contains the dentry of interest. */
-	/*
-	rc = _fat_block_get(&b, bs, idxp->devmap_handle, idxp->pfc, NULL,
-	    (idxp->pdi * sizeof(fat_dentry_t)) / BPS(bs), BLOCK_FLAGS_NONE);
-	if (rc != EOK) {
-		(void) fat_node_put(FS_NODE(nodep));
-		return rc;
-	}
-
-	d = ((fat_dentry_t *)b->data) + (idxp->pdi % DPS(bs));
-	*/
 
 	nodep->lnkcnt = 1;
@@ -393,4 +391,5 @@
 int exfat_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
+	/* TODO */
 	*rfn = NULL;
 	return EOK;
@@ -428,4 +427,5 @@
 int exfat_node_put(fs_node_t *fn)
 {
+	/* TODO */
 	return EOK;
 }
@@ -433,4 +433,5 @@
 int exfat_create_node(fs_node_t **rfn, devmap_handle_t devmap_handle, int flags)
 {
+	/* TODO */
 	*rfn = NULL;
 	return EOK;
@@ -439,4 +440,5 @@
 int exfat_destroy_node(fs_node_t *fn)
 {
+	/* TODO */
 	return EOK;
 }
@@ -444,4 +446,5 @@
 int exfat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
+	/* TODO */
 	return EOK;
 }
@@ -449,4 +452,5 @@
 int exfat_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
 {
+	/* TODO */
 	return EOK;
 }
