Index: uspace/lib/ext4/src/directory.c
===================================================================
--- uspace/lib/ext4/src/directory.c	(revision 38d150e6238ab44c861f6486e46454e07caeb0f0)
+++ uspace/lib/ext4/src/directory.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -169,6 +169,6 @@
 }
 
-static int ext4_directory_iterator_seek(ext4_directory_iterator_t *, aoff64_t);
-static int ext4_directory_iterator_set(ext4_directory_iterator_t *, uint32_t);
+static errno_t ext4_directory_iterator_seek(ext4_directory_iterator_t *, aoff64_t);
+static errno_t ext4_directory_iterator_set(ext4_directory_iterator_t *, uint32_t);
 
 /** Initialize directory iterator.
@@ -183,5 +183,5 @@
  *
  */
-int ext4_directory_iterator_init(ext4_directory_iterator_t *it,
+errno_t ext4_directory_iterator_init(ext4_directory_iterator_t *it,
     ext4_inode_ref_t *inode_ref, aoff64_t pos)
 {
@@ -201,5 +201,5 @@
  *
  */
-int ext4_directory_iterator_next(ext4_directory_iterator_t *it)
+errno_t ext4_directory_iterator_next(ext4_directory_iterator_t *it)
 {
 	assert(it->current != NULL);
@@ -220,5 +220,5 @@
  *
  */
-int ext4_directory_iterator_seek(ext4_directory_iterator_t *it, aoff64_t pos)
+errno_t ext4_directory_iterator_seek(ext4_directory_iterator_t *it, aoff64_t pos)
 {
 	uint64_t size = ext4_inode_get_size(it->inode_ref->fs->superblock,
@@ -231,5 +231,5 @@
 	if (pos >= size) {
 		if (it->current_block) {
-			int rc = block_put(it->current_block);
+			errno_t rc = block_put(it->current_block);
 			it->current_block = NULL;
 			
@@ -255,5 +255,5 @@
 	    (current_block_idx != next_block_idx)) {
 		if (it->current_block) {
-			int rc = block_put(it->current_block);
+			errno_t rc = block_put(it->current_block);
 			it->current_block = NULL;
 			
@@ -263,5 +263,5 @@
 		
 		uint32_t next_block_phys_idx;
-		int rc = ext4_filesystem_get_inode_data_block_index(it->inode_ref,
+		errno_t rc = ext4_filesystem_get_inode_data_block_index(it->inode_ref,
 		    next_block_idx, &next_block_phys_idx);
 		if (rc != EOK)
@@ -289,5 +289,5 @@
  *
  */
-static int ext4_directory_iterator_set(ext4_directory_iterator_t *it,
+static errno_t ext4_directory_iterator_set(ext4_directory_iterator_t *it,
     uint32_t block_size)
 {
@@ -331,5 +331,5 @@
  *
  */
-int ext4_directory_iterator_fini(ext4_directory_iterator_t *it)
+errno_t ext4_directory_iterator_fini(ext4_directory_iterator_t *it)
 {
 	it->inode_ref = NULL;
@@ -386,5 +386,5 @@
  *
  */
-int ext4_directory_add_entry(ext4_inode_ref_t *parent, const char *name,
+errno_t ext4_directory_add_entry(ext4_inode_ref_t *parent, const char *name,
     ext4_inode_ref_t *child)
 {
@@ -395,5 +395,5 @@
 	    EXT4_FEATURE_COMPAT_DIR_INDEX)) &&
 	    (ext4_inode_has_flag(parent->inode, EXT4_INODE_FLAG_INDEX))) {
-		int rc = ext4_directory_dx_add_entry(parent, child, name);
+		errno_t rc = ext4_directory_dx_add_entry(parent, child, name);
 
 		/* Check if index is not corrupted */
@@ -419,5 +419,5 @@
 	bool success = false;
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
-		int rc = ext4_filesystem_get_inode_data_block_index(parent,
+		errno_t rc = ext4_filesystem_get_inode_data_block_index(parent,
 		    iblock, &fblock);
 		if (rc != EOK)
@@ -447,5 +447,5 @@
 	iblock = 0;
 	fblock = 0;
-	int rc = ext4_filesystem_append_inode_block(parent, &fblock, &iblock);
+	errno_t rc = ext4_filesystem_append_inode_block(parent, &fblock, &iblock);
 	if (rc != EOK)
 		return rc;
@@ -479,5 +479,5 @@
  *
  */
-int ext4_directory_find_entry(ext4_directory_search_result_t *result,
+errno_t ext4_directory_find_entry(ext4_directory_search_result_t *result,
     ext4_inode_ref_t *parent, const char *name)
 {
@@ -490,5 +490,5 @@
 	    EXT4_FEATURE_COMPAT_DIR_INDEX)) &&
 	    (ext4_inode_has_flag(parent->inode, EXT4_INODE_FLAG_INDEX))) {
-		int rc = ext4_directory_dx_find_entry(result, parent, name_len,
+		errno_t rc = ext4_directory_dx_find_entry(result, parent, name_len,
 		    name);
 		
@@ -517,5 +517,5 @@
 	for (iblock = 0; iblock < total_blocks; ++iblock) {
 		/* Load block address */
-		int rc = ext4_filesystem_get_inode_data_block_index(parent, iblock,
+		errno_t rc = ext4_filesystem_get_inode_data_block_index(parent, iblock,
 		    &fblock);
 		if (rc != EOK)
@@ -561,5 +561,5 @@
  *
  */
-int ext4_directory_remove_entry(ext4_inode_ref_t *parent, const char *name)
+errno_t ext4_directory_remove_entry(ext4_inode_ref_t *parent, const char *name)
 {
 	/* Check if removing from directory */
@@ -570,5 +570,5 @@
 	/* Try to find entry */
 	ext4_directory_search_result_t result;
-	int rc = ext4_directory_find_entry(&result, parent, name);
+	errno_t rc = ext4_directory_find_entry(&result, parent, name);
 	if (rc != EOK)
 		return rc;
@@ -626,5 +626,5 @@
  *
  */
-int ext4_directory_try_insert_entry(ext4_superblock_t *sb,
+errno_t ext4_directory_try_insert_entry(ext4_superblock_t *sb,
     block_t *target_block, ext4_inode_ref_t *child, const char *name,
     uint32_t name_len)
@@ -705,5 +705,5 @@
  *
  */
-int ext4_directory_find_in_block(block_t *block, ext4_superblock_t *sb,
+errno_t ext4_directory_find_in_block(block_t *block, ext4_superblock_t *sb,
     size_t name_len, const char *name, ext4_directory_entry_ll_t **res_entry)
 {
@@ -756,5 +756,5 @@
  *
  */
-int ext4_directory_destroy_result(ext4_directory_search_result_t *result)
+errno_t ext4_directory_destroy_result(ext4_directory_search_result_t *result)
 {
 	if (result->block)
