Index: uspace/lib/ext4/libext4_directory.c
===================================================================
--- uspace/lib/ext4/libext4_directory.c	(revision bae2a79e350ae4a3b0b75d5e6598946426b53acb)
+++ uspace/lib/ext4/libext4_directory.c	(revision 06d85e53f2ba96bd2ea9eae7bc274870ba1e1a85)
@@ -159,5 +159,5 @@
 	}
 
-	// else do nothing
+	/* else do nothing */
 
 }
@@ -237,5 +237,5 @@
 	}
 
-	// Compute next block address
+	/* Compute next block address */
 	uint32_t block_size = ext4_superblock_get_block_size(
 			it->inode_ref->fs->superblock);
@@ -313,5 +313,5 @@
 	}
 
-	// Everything OK - "publish" the entry
+	/* Everything OK - "publish" the entry */
 	it->current = entry;
 	return EOK;
@@ -357,17 +357,17 @@
 {
 
-	// Check maximum entry length
+	/* Check maximum entry length */
 	uint32_t block_size = ext4_superblock_get_block_size(sb);
 	assert(entry_len <= block_size);
 
-	// Set basic attributes
+	/* Set basic attributes */
 	ext4_directory_entry_ll_set_inode(entry, child->index);
 	ext4_directory_entry_ll_set_entry_length(entry, entry_len);
 	ext4_directory_entry_ll_set_name_length(sb, entry, name_len);
 
-	// Write name
+	/* Write name */
 	memcpy(entry->name, name, name_len);
 
-	// Set type of entry
+	/* Set type of entry */
 	if (ext4_inode_is_type(sb, child->inode, EXT4_INODE_MODE_DIRECTORY)) {
 		ext4_directory_entry_ll_set_inode_type(
@@ -394,5 +394,5 @@
 	ext4_filesystem_t *fs = parent->fs;
 
-	// Index adding (if allowed)
+	/* Index adding (if allowed) */
 	if (ext4_superblock_has_feature_compatible(fs->superblock, EXT4_FEATURE_COMPAT_DIR_INDEX) &&
 			ext4_inode_has_flag(parent->inode, EXT4_INODE_FLAG_INDEX)) {
@@ -400,5 +400,5 @@
 		rc = ext4_directory_dx_add_entry(parent, child, name);
 
-		// Check if index is not corrupted
+		/* Check if index is not corrupted */
 		if (rc != EXT4_ERR_BAD_DX_DIR) {
 
@@ -410,5 +410,5 @@
 		}
 
-		// Needed to clear dir index flag if corrupted
+		/* Needed to clear dir index flag if corrupted */
 		ext4_inode_clear_flag(parent->inode, EXT4_INODE_FLAG_INDEX);
 		parent->dirty = true;
@@ -417,5 +417,5 @@
 	}
 
-	// Linear algorithm
+	/* Linear algorithm */
 
 	uint32_t iblock = 0, fblock = 0;
@@ -426,5 +426,5 @@
 	uint32_t name_len = strlen(name);
 
-	// Find block, where is space for new entry and try to add
+	/* Find block, where is space for new entry and try to add */
 	bool success = false;
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
@@ -441,5 +441,5 @@
 		}
 
-		// If adding is successful, function can finish
+		/* If adding is successful, function can finish */
 		rc = ext4_directory_try_insert_entry(fs->superblock, block, child, name, name_len);
 		if (rc == EOK) {
@@ -457,5 +457,5 @@
 	}
 
-	// No free block found - needed to allocate next data block
+	/* No free block found - needed to allocate next data block */
 
 	iblock = 0;
@@ -466,5 +466,5 @@
 	}
 
-	// Load new block
+	/* Load new block */
 	block_t *new_block;
 	rc = block_get(&new_block, fs->device, fblock, BLOCK_FLAGS_NOREAD);
@@ -473,10 +473,10 @@
 	}
 
-	// Fill block with zeroes
+	/* Fill block with zeroes */
 	memset(new_block->data, 0, block_size);
 	ext4_directory_entry_ll_t *block_entry = new_block->data;
 	ext4_directory_write_entry(fs->superblock, block_entry, block_size, child, name, name_len);
 
-	// Save new block
+	/* Save new block */
 	new_block->dirty = true;
 	rc = block_put(new_block);
@@ -503,5 +503,5 @@
 	ext4_superblock_t *sb = parent->fs->superblock;
 
-	// Index search
+	/* Index search */
 	if (ext4_superblock_has_feature_compatible(sb, EXT4_FEATURE_COMPAT_DIR_INDEX) &&
 			ext4_inode_has_flag(parent->inode, EXT4_INODE_FLAG_INDEX)) {
@@ -509,5 +509,5 @@
 		rc = ext4_directory_dx_find_entry(result, parent, name_len, name);
 
-		// Check if index is not corrupted
+		/* Check if index is not corrupted */
 		if (rc != EXT4_ERR_BAD_DX_DIR) {
 
@@ -518,5 +518,5 @@
 		}
 
-		// Needed to clear dir index flag if corrupted
+		/* Needed to clear dir index flag if corrupted */
 		ext4_inode_clear_flag(parent->inode, EXT4_INODE_FLAG_INDEX);
 		parent->dirty = true;
@@ -525,5 +525,5 @@
 	}
 
-	// Linear algorithm
+	/* Linear algorithm */
 
 	uint32_t iblock, fblock;
@@ -532,8 +532,8 @@
 	uint32_t total_blocks = inode_size / block_size;
 
-	// Walk through all data blocks
+	/* Walk through all data blocks */
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
 
-		// Load block address
+		/* Load block address */
 		rc = ext4_filesystem_get_inode_data_block_index(parent, iblock, &fblock);
 		if (rc != EOK) {
@@ -541,5 +541,5 @@
 		}
 
-		// Load data block
+		/* Load data block */
 		block_t *block;
 		rc = block_get(&block, parent->fs->device, fblock, BLOCK_FLAGS_NONE);
@@ -548,5 +548,5 @@
 		}
 
-		// Try to find entry in block
+		/* Try to find entry in block */
 		ext4_directory_entry_ll_t *res_entry;
 		rc = ext4_directory_find_in_block(block, sb, name_len, name, &res_entry);
@@ -557,5 +557,5 @@
 		}
 
-		// Entry not found - put block and continue to the next block
+		/* Entry not found - put block and continue to the next block */
 
 		rc = block_put(block);
@@ -565,5 +565,5 @@
 	}
 
-	// Entry was not found
+	/* Entry was not found */
 
 	result->block = NULL;
@@ -584,5 +584,5 @@
 	int rc;
 
-	// Check if removing from directory
+	/* Check if removing from directory */
 	if (!ext4_inode_is_type(parent->fs->superblock, parent->inode,
 	    EXT4_INODE_MODE_DIRECTORY)) {
@@ -590,5 +590,5 @@
 	}
 
-	// Try to find entry
+	/* Try to find entry */
 	ext4_directory_search_result_t result;
 	rc  = ext4_directory_find_entry(&result, parent, name);
@@ -597,22 +597,23 @@
 	}
 
-	// Invalidate entry
+	/* Invalidate entry */
 	ext4_directory_entry_ll_set_inode(result.dentry, 0);
 
-	// Store entry position in block
+	/* Store entry position in block */
 	uint32_t pos = (void *)result.dentry - result.block->data;
 
-	// If entry is not the first in block, it must be merged
-	// with previous entry
+	/* If entry is not the first in block, it must be merged
+	 * with previous entry
+	 */
 	if (pos != 0) {
 
 		uint32_t offset = 0;
 
-		// Start from the first entry in block
+		/* Start from the first entry in block */
 		ext4_directory_entry_ll_t *tmp_dentry = result.block->data;
 		uint16_t tmp_dentry_length =
 				ext4_directory_entry_ll_get_entry_length(tmp_dentry);
 
-		// Find direct predecessor of removed entry
+		/* Find direct predecessor of removed entry */
 		while ((offset + tmp_dentry_length) < pos) {
 			offset += ext4_directory_entry_ll_get_entry_length(tmp_dentry);
@@ -624,5 +625,5 @@
 		assert(tmp_dentry_length + offset == pos);
 
-		// Add to removed entry length to predecessor's length
+		/* Add to removed entry length to predecessor's length */
 		uint16_t del_entry_length =
 				ext4_directory_entry_ll_get_entry_length(result.dentry);
@@ -650,5 +651,5 @@
 		const char *name, uint32_t name_len)
 {
-	// Compute required length entry and align it to 4 bytes
+	/* Compute required length entry and align it to 4 bytes */
    	uint32_t block_size = ext4_superblock_get_block_size(sb);
    	uint16_t required_len = sizeof(ext4_fake_directory_entry_t) + name_len;
@@ -657,10 +658,11 @@
    	}
 
-   	// Initialize pointers, stop means to upper bound
+   	/* Initialize pointers, stop means to upper bound */
    	ext4_directory_entry_ll_t *dentry = target_block->data;
    	ext4_directory_entry_ll_t *stop = target_block->data + block_size;
 
-   	// Walk through the block and check for invalid entries
-   	// or entries with free space for new entry
+   	/* Walk through the block and check for invalid entries
+   	 * or entries with free space for new entry
+   	 */
    	while (dentry < stop) {
 
@@ -668,5 +670,5 @@
    		uint16_t rec_len = ext4_directory_entry_ll_get_entry_length(dentry);
 
-   		// If invalid and large enough entry, use it
+   		/* If invalid and large enough entry, use it */
    		if ((inode == 0) && (rec_len >= required_len)) {
    			ext4_directory_write_entry(sb, dentry, rec_len, child, name, name_len);
@@ -675,5 +677,5 @@
    		}
 
-   		// Valid entry, try to split it
+   		/* Valid entry, try to split it */
    		if (inode != 0) {
    			uint16_t used_name_len =
@@ -687,8 +689,8 @@
    			uint16_t free_space = rec_len - used_space;
 
-   			// There is free space for new entry
+   			/* There is free space for new entry */
    			if (free_space >= required_len) {
 
-   				// Cut tail of current entry
+   				/* Cut tail of current entry */
    				ext4_directory_entry_ll_set_entry_length(dentry, used_space);
    				ext4_directory_entry_ll_t *new_entry =
@@ -702,9 +704,9 @@
    		}
 
-   		// Jump to the next entry
+   		/* Jump to the next entry */
    		dentry = (void *)dentry + rec_len;
    	}
 
-   	// No free space found for new entry
+   	/* No free space found for new entry */
 
    	return ENOSPC;
@@ -724,23 +726,23 @@
 		ext4_directory_entry_ll_t **res_entry)
 {
-	// Start from the first entry in block
+	/* Start from the first entry in block */
 	ext4_directory_entry_ll_t *dentry = (ext4_directory_entry_ll_t *)block->data;
-	//Set upper bound for cycling
+	/*Set upper bound for cycling */
 	uint8_t *addr_limit = block->data + ext4_superblock_get_block_size(sb);
 
-	// Walk through the block and check entries
+	/* Walk through the block and check entries */
 	while ((uint8_t *)dentry < addr_limit) {
 
-		// Termination condition
+		/* Termination condition */
 		if ((uint8_t*) dentry + name_len > addr_limit) {
 			break;
 		}
 
-		// Valid entry - check it
+		/* Valid entry - check it */
 		if (dentry->inode != 0) {
 
-			// For more effectivity compare firstly only lengths
+			/* For more effectivity compare firstly only lengths */
 			if (name_len == ext4_directory_entry_ll_get_name_length(sb, dentry)) {
-				// Compare names
+				/* Compare names */
 				if (bcmp((uint8_t *)name, dentry->name, name_len) == 0) {
 					*res_entry = dentry;
@@ -752,14 +754,14 @@
 		uint16_t dentry_len = ext4_directory_entry_ll_get_entry_length(dentry);
 
-		// Corrupted entry
+		/* Corrupted entry */
 		if (dentry_len == 0) {
 			return EINVAL;
 		}
 
-		// Jump to next entry
+		/* Jump to next entry */
 		dentry = (ext4_directory_entry_ll_t *)((uint8_t *)dentry + dentry_len);
 	}
 
-	// Entry not found
+	/* Entry not found */
 	return ENOENT;
 }
