Index: uspace/lib/ext4/src/balloc.c
===================================================================
--- uspace/lib/ext4/src/balloc.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/balloc.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -53,5 +53,5 @@
  *
  */
-int ext4_balloc_free_block(ext4_inode_ref_t *inode_ref, uint32_t block_addr)
+errno_t ext4_balloc_free_block(ext4_inode_ref_t *inode_ref, uint32_t block_addr)
 {
 	ext4_filesystem_t *fs = inode_ref->fs;
@@ -65,5 +65,5 @@
 	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
-	int rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
+	errno_t rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
 	if (rc != EOK)
 		return rc;
@@ -118,5 +118,5 @@
 }
 
-static int ext4_balloc_free_blocks_internal(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_balloc_free_blocks_internal(ext4_inode_ref_t *inode_ref,
     uint32_t first, uint32_t count)
 {
@@ -134,5 +134,5 @@
 	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
-	int rc = ext4_filesystem_get_block_group_ref(fs, block_group_first, &bg_ref);
+	errno_t rc = ext4_filesystem_get_block_group_ref(fs, block_group_first, &bg_ref);
 	if (rc != EOK)
 		return rc;
@@ -198,8 +198,8 @@
  *
  */
-int ext4_balloc_free_blocks(ext4_inode_ref_t *inode_ref,
+errno_t ext4_balloc_free_blocks(ext4_inode_ref_t *inode_ref,
     uint32_t first, uint32_t count)
 {
-	int r;
+	errno_t r;
 	uint32_t gid;
 	uint64_t limit;
@@ -293,5 +293,5 @@
  *
  */
-static int ext4_balloc_find_goal(ext4_inode_ref_t *inode_ref, uint32_t *goal)
+static errno_t ext4_balloc_find_goal(ext4_inode_ref_t *inode_ref, uint32_t *goal)
 {
 	*goal = 0;
@@ -307,5 +307,5 @@
 	/* If inode has some blocks, get last block address + 1 */
 	if (inode_block_count > 0) {
-		int rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
+		errno_t rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
 		    inode_block_count - 1, goal);
 		if (rc != EOK)
@@ -325,5 +325,5 @@
 	/* Load block group reference */
 	ext4_block_group_ref_t *bg_ref;
-	int rc = ext4_filesystem_get_block_group_ref(inode_ref->fs,
+	errno_t rc = ext4_filesystem_get_block_group_ref(inode_ref->fs,
 	    block_group, &bg_ref);
 	if (rc != EOK)
@@ -343,5 +343,5 @@
  *
  */
-int ext4_balloc_alloc_block(ext4_inode_ref_t *inode_ref, uint32_t *fblock)
+errno_t ext4_balloc_alloc_block(ext4_inode_ref_t *inode_ref, uint32_t *fblock)
 {
 	uint32_t allocated_block = 0;
@@ -354,5 +354,5 @@
 	
 	/* Find GOAL */
-	int rc = ext4_balloc_find_goal(inode_ref, &goal);
+	errno_t rc = ext4_balloc_find_goal(inode_ref, &goal);
 	if (rc != EOK)
 		return rc;
@@ -625,8 +625,8 @@
  *
  */
-int ext4_balloc_try_alloc_block(ext4_inode_ref_t *inode_ref, uint32_t fblock,
+errno_t ext4_balloc_try_alloc_block(ext4_inode_ref_t *inode_ref, uint32_t fblock,
     bool *free)
 {
-	int rc;
+	errno_t rc;
 	
 	ext4_filesystem_t *fs = inode_ref->fs;
Index: uspace/lib/ext4/src/bitmap.c
===================================================================
--- uspace/lib/ext4/src/bitmap.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/bitmap.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -169,5 +169,5 @@
  *
  */
-int ext4_bitmap_find_free_byte_and_set_bit(uint8_t *bitmap, uint32_t start,
+errno_t ext4_bitmap_find_free_byte_and_set_bit(uint8_t *bitmap, uint32_t start,
     uint32_t *index, uint32_t max)
 {
@@ -211,5 +211,5 @@
  *
  */
-int ext4_bitmap_find_free_bit_and_set(uint8_t *bitmap, uint32_t start_idx,
+errno_t ext4_bitmap_find_free_bit_and_set(uint8_t *bitmap, uint32_t start_idx,
     uint32_t *index, uint32_t max)
 {
Index: uspace/lib/ext4/src/directory.c
===================================================================
--- uspace/lib/ext4/src/directory.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ 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)
Index: uspace/lib/ext4/src/directory_index.c
===================================================================
--- uspace/lib/ext4/src/directory_index.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/directory_index.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -236,9 +236,9 @@
  *
  */
-int ext4_directory_dx_init(ext4_inode_ref_t *dir)
+errno_t ext4_directory_dx_init(ext4_inode_ref_t *dir)
 {
 	/* Load block 0, where will be index root located */
 	uint32_t fblock;
-	int rc = ext4_filesystem_get_inode_data_block_index(dir, 0,
+	errno_t rc = ext4_filesystem_get_inode_data_block_index(dir, 0,
 	    &fblock);
 	if (rc != EOK)
@@ -322,5 +322,5 @@
  *
  */
-static int ext4_directory_hinfo_init(ext4_hash_info_t *hinfo,
+static errno_t ext4_directory_hinfo_init(ext4_hash_info_t *hinfo,
     block_t *root_block, ext4_superblock_t *sb, size_t name_len,
     const char *name)
@@ -384,5 +384,5 @@
  *
  */
-static int ext4_directory_dx_get_leaf(ext4_hash_info_t *hinfo,
+static errno_t ext4_directory_dx_get_leaf(ext4_hash_info_t *hinfo,
     ext4_inode_ref_t *inode_ref, block_t *root_block,
     ext4_directory_dx_block_t **dx_block, ext4_directory_dx_block_t *dx_blocks)
@@ -443,5 +443,5 @@
 		
 		uint32_t fblock;
-		int rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
+		errno_t rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
 		    next_block, &fblock);
 		if (rc != EOK)
@@ -484,5 +484,5 @@
  *
  */
-static int ext4_directory_dx_next_block(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_directory_dx_next_block(ext4_inode_ref_t *inode_ref,
     uint32_t hash, ext4_directory_dx_block_t *dx_block,
     ext4_directory_dx_block_t *dx_blocks)
@@ -520,5 +520,5 @@
 		uint32_t block_addr;
 		
-		int rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
+		errno_t rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
 		    block_idx, &block_addr);
 		if (rc != EOK)
@@ -556,11 +556,11 @@
  *
  */
-int ext4_directory_dx_find_entry(ext4_directory_search_result_t *result,
+errno_t ext4_directory_dx_find_entry(ext4_directory_search_result_t *result,
     ext4_inode_ref_t *inode_ref, size_t name_len, const char *name)
 {
 	/* Load direct block 0 (index root) */
 	uint32_t root_block_addr;
-	int rc2;
-	int rc = ext4_filesystem_get_inode_data_block_index(inode_ref, 0,
+	errno_t rc2;
+	errno_t rc = ext4_filesystem_get_inode_data_block_index(inode_ref, 0,
 	    &root_block_addr);
 	if (rc != EOK)
@@ -728,9 +728,9 @@
  *
  */
-static int ext4_directory_dx_split_data(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_directory_dx_split_data(ext4_inode_ref_t *inode_ref,
     ext4_hash_info_t *hinfo, block_t *old_data_block,
     ext4_directory_dx_block_t *index_block, block_t **new_data_block)
 {
-	int rc = EOK;
+	errno_t rc = EOK;
 	
 	/* Allocate buffer for directory entries */
@@ -897,5 +897,5 @@
  *
  */
-static int ext4_directory_dx_split_index(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_directory_dx_split_index(ext4_inode_ref_t *inode_ref,
 		ext4_directory_dx_block_t *dx_blocks, ext4_directory_dx_block_t *dx_block)
 {
@@ -937,5 +937,5 @@
 		uint32_t new_fblock;
 		uint32_t new_iblock;
-		int rc = ext4_filesystem_append_inode_block(inode_ref,
+		errno_t rc = ext4_filesystem_append_inode_block(inode_ref,
 		    &new_fblock, &new_iblock);
 		if (rc != EOK)
@@ -1045,12 +1045,12 @@
  *
  */
-int ext4_directory_dx_add_entry(ext4_inode_ref_t *parent,
+errno_t ext4_directory_dx_add_entry(ext4_inode_ref_t *parent,
     ext4_inode_ref_t *child, const char *name)
 {
-	int rc2 = EOK;
+	errno_t rc2 = EOK;
 	
 	/* Get direct block 0 (index root) */
 	uint32_t root_block_addr;
-	int rc = ext4_filesystem_get_inode_data_block_index(parent, 0,
+	errno_t rc = ext4_filesystem_get_inode_data_block_index(parent, 0,
 	    &root_block_addr);
 	if (rc != EOK)
Index: uspace/lib/ext4/src/extent.c
===================================================================
--- uspace/lib/ext4/src/extent.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/extent.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -372,8 +372,8 @@
  *
  */
-int ext4_extent_find_block(ext4_inode_ref_t *inode_ref, uint32_t iblock,
+errno_t ext4_extent_find_block(ext4_inode_ref_t *inode_ref, uint32_t iblock,
     uint32_t *fblock)
 {
-	int rc = EOK;
+	errno_t rc = EOK;
 	/* Compute bound defined by i-node size */
 	uint64_t inode_size =
@@ -454,5 +454,5 @@
  *
  */
-static int ext4_extent_find_extent(ext4_inode_ref_t *inode_ref, uint32_t iblock,
+static errno_t ext4_extent_find_extent(ext4_inode_ref_t *inode_ref, uint32_t iblock,
     ext4_extent_path_t **ret_path)
 {
@@ -475,5 +475,5 @@
 	/* Walk through the extent tree */
 	uint16_t pos = 0;
-	int rc;
+	errno_t rc;
 	while (ext4_extent_header_get_depth(eh) != 0) {
 		/* Search index in index node by iblock */
@@ -515,5 +515,5 @@
 	;
 
-	int rc2 = EOK;
+	errno_t rc2 = EOK;
 
 	/*
@@ -543,5 +543,5 @@
  *
  */
-static int ext4_extent_release(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_extent_release(ext4_inode_ref_t *inode_ref,
     ext4_extent_t *extent)
 {
@@ -565,5 +565,5 @@
  *
  */
-static int ext4_extent_release_branch(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_extent_release_branch(ext4_inode_ref_t *inode_ref,
 		ext4_extent_index_t *index)
 {
@@ -571,5 +571,5 @@
 	
 	block_t* block;
-	int rc = block_get(&block, inode_ref->fs->device, fblock, BLOCK_FLAGS_NONE);
+	errno_t rc = block_get(&block, inode_ref->fs->device, fblock, BLOCK_FLAGS_NONE);
 	if (rc != EOK)
 		return rc;
@@ -618,10 +618,10 @@
  *
  */
-int ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref,
+errno_t ext4_extent_release_blocks_from(ext4_inode_ref_t *inode_ref,
     uint32_t iblock_from)
 {
 	/* Find the first extent to modify */
 	ext4_extent_path_t *path;
-	int rc = ext4_extent_find_extent(inode_ref, iblock_from, &path);
+	errno_t rc = ext4_extent_find_extent(inode_ref, iblock_from, &path);
 	if (rc != EOK)
 		return rc;
@@ -736,5 +736,5 @@
 	;
 
-	int rc2 = EOK;
+	errno_t rc2 = EOK;
 
 	/*
@@ -767,5 +767,5 @@
  *
  */
-static int ext4_extent_append_extent(ext4_inode_ref_t *inode_ref,
+static errno_t ext4_extent_append_extent(ext4_inode_ref_t *inode_ref,
     ext4_extent_path_t *path, uint32_t iblock)
 {
@@ -785,5 +785,5 @@
 			/* Full node - allocate block for new one */
 			uint32_t fblock;
-			int rc = ext4_balloc_alloc_block(inode_ref, &fblock);
+			errno_t rc = ext4_balloc_alloc_block(inode_ref, &fblock);
 			if (rc != EOK)
 				return rc;
@@ -863,5 +863,5 @@
 	if (entries == limit) {
 		uint32_t new_fblock;
-		int rc = ext4_balloc_alloc_block(inode_ref, &new_fblock);
+		errno_t rc = ext4_balloc_alloc_block(inode_ref, &new_fblock);
 		if (rc != EOK)
 			return rc;
@@ -964,5 +964,5 @@
  *
  */
-int ext4_extent_append_block(ext4_inode_ref_t *inode_ref, uint32_t *iblock,
+errno_t ext4_extent_append_block(ext4_inode_ref_t *inode_ref, uint32_t *iblock,
     uint32_t *fblock, bool update_size)
 {
@@ -982,5 +982,5 @@
 	/* Load the nearest leaf (with extent) */
 	ext4_extent_path_t *path;
-	int rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path);
+	errno_t rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path);
 	if (rc != EOK)
 		return rc;
@@ -1088,5 +1088,5 @@
 	;
 
-	int rc2 = EOK;
+	errno_t rc2 = EOK;
 
 	/* Set return values */
Index: uspace/lib/ext4/src/filesystem.c
===================================================================
--- uspace/lib/ext4/src/filesystem.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/filesystem.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -54,5 +54,5 @@
 #include "ext4/superblock.h"
 
-static int ext4_filesystem_check_features(ext4_filesystem_t *, bool *);
+static errno_t ext4_filesystem_check_features(ext4_filesystem_t *, bool *);
 
 /** Initialize filesystem for opening.
@@ -67,8 +67,8 @@
  *
  */
-static int ext4_filesystem_init(ext4_filesystem_t *fs, service_id_t service_id,
+static errno_t ext4_filesystem_init(ext4_filesystem_t *fs, service_id_t service_id,
     enum cache_mode cmode)
 {
-	int rc;
+	errno_t rc;
 	ext4_superblock_t *temp_superblock = NULL;
 
@@ -164,8 +164,8 @@
  *
  */
-int ext4_filesystem_probe(service_id_t service_id)
+errno_t ext4_filesystem_probe(service_id_t service_id)
 {
 	ext4_filesystem_t *fs = NULL;
-	int rc;
+	errno_t rc;
 
 	fs = calloc(1, sizeof(ext4_filesystem_t));
@@ -195,10 +195,10 @@
  *
  */
-int ext4_filesystem_open(ext4_instance_t *inst, service_id_t service_id,
+errno_t ext4_filesystem_open(ext4_instance_t *inst, service_id_t service_id,
     enum cache_mode cmode, aoff64_t *size, ext4_filesystem_t **rfs)
 {
 	ext4_filesystem_t *fs = NULL;
 	fs_node_t *root_node = NULL;
-	int rc;
+	errno_t rc;
 
 	fs = calloc(1, sizeof(ext4_filesystem_t));
@@ -256,9 +256,9 @@
  *
  */
-int ext4_filesystem_close(ext4_filesystem_t *fs)
+errno_t ext4_filesystem_close(ext4_filesystem_t *fs)
 {
 	/* Write the superblock to the device */
 	ext4_superblock_set_state(fs->superblock, EXT4_SUPERBLOCK_STATE_VALID_FS);
-	int rc = ext4_superblock_write_direct(fs->device, fs->superblock);
+	errno_t rc = ext4_superblock_write_direct(fs->device, fs->superblock);
 	if (rc != EOK)
 		return rc;
@@ -281,5 +281,5 @@
  *
  */
-static int ext4_filesystem_check_features(ext4_filesystem_t *fs,
+static errno_t ext4_filesystem_check_features(ext4_filesystem_t *fs,
     bool *read_only)
 {
@@ -380,5 +380,5 @@
  *
  */
-static int ext4_filesystem_init_block_bitmap(ext4_block_group_ref_t *bg_ref)
+static errno_t ext4_filesystem_init_block_bitmap(ext4_block_group_ref_t *bg_ref)
 {
 	uint64_t itb;
@@ -394,5 +394,5 @@
 	
 	block_t *bitmap_block;
-	int rc = block_get(&bitmap_block, bg_ref->fs->device,
+	errno_t rc = block_get(&bitmap_block, bg_ref->fs->device,
 	    bitmap_block_addr, BLOCK_FLAGS_NOREAD);
 	if (rc != EOK)
@@ -451,5 +451,5 @@
  *
  */
-static int ext4_filesystem_init_inode_bitmap(ext4_block_group_ref_t *bg_ref)
+static errno_t ext4_filesystem_init_inode_bitmap(ext4_block_group_ref_t *bg_ref)
 {
 	/* Load bitmap */
@@ -458,5 +458,5 @@
 	block_t *bitmap_block;
 	
-	int rc = block_get(&bitmap_block, bg_ref->fs->device,
+	errno_t rc = block_get(&bitmap_block, bg_ref->fs->device,
 	    bitmap_block_addr, BLOCK_FLAGS_NOREAD);
 	if (rc != EOK)
@@ -494,5 +494,5 @@
  *
  */
-static int ext4_filesystem_init_inode_table(ext4_block_group_ref_t *bg_ref)
+static errno_t ext4_filesystem_init_inode_table(ext4_block_group_ref_t *bg_ref)
 {
 	ext4_superblock_t *sb = bg_ref->fs->superblock;
@@ -519,5 +519,5 @@
 	for (uint32_t fblock = first_block; fblock <= last_block; ++fblock) {
 		block_t *block;
-		int rc = block_get(&block, bg_ref->fs->device, fblock,
+		errno_t rc = block_get(&block, bg_ref->fs->device, fblock,
 		    BLOCK_FLAGS_NOREAD);
 		if (rc != EOK)
@@ -544,5 +544,5 @@
  *
  */
-int ext4_filesystem_get_block_group_ref(ext4_filesystem_t *fs, uint32_t bgid,
+errno_t ext4_filesystem_get_block_group_ref(ext4_filesystem_t *fs, uint32_t bgid,
     ext4_block_group_ref_t **ref)
 {
@@ -568,5 +568,5 @@
 	
 	/* Load block with descriptors */
-	int rc = block_get(&newref->block, fs->device, block_id, 0);
+	errno_t rc = block_get(&newref->block, fs->device, block_id, 0);
 	if (rc != EOK) {
 		free(newref);
@@ -804,5 +804,5 @@
  *
  */
-int ext4_filesystem_put_block_group_ref(ext4_block_group_ref_t *ref)
+errno_t ext4_filesystem_put_block_group_ref(ext4_block_group_ref_t *ref)
 {
 	/* Check if reference modified */
@@ -819,5 +819,5 @@
 	
 	/* Put back block, that contains block group descriptor */
-	int rc = block_put(ref->block);
+	errno_t rc = block_put(ref->block);
 	free(ref);
 	
@@ -834,5 +834,5 @@
  *
  */
-int ext4_filesystem_get_inode_ref(ext4_filesystem_t *fs, uint32_t index,
+errno_t ext4_filesystem_get_inode_ref(ext4_filesystem_t *fs, uint32_t index,
     ext4_inode_ref_t **ref)
 {
@@ -857,5 +857,5 @@
 	/* Load block group, where i-node is located */
 	ext4_block_group_ref_t *bg_ref;
-	int rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
+	errno_t rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
 	if (rc != EOK) {
 		free(newref);
@@ -909,5 +909,5 @@
  *
  */
-int ext4_filesystem_put_inode_ref(ext4_inode_ref_t *ref)
+errno_t ext4_filesystem_put_inode_ref(ext4_inode_ref_t *ref)
 {
 	/* Check if reference modified */
@@ -918,5 +918,5 @@
 	
 	/* Put back block, that contains i-node */
-	int rc = block_put(ref->block);
+	errno_t rc = block_put(ref->block);
 	free(ref);
 	
@@ -933,5 +933,5 @@
  *
  */
-int ext4_filesystem_alloc_inode(ext4_filesystem_t *fs,
+errno_t ext4_filesystem_alloc_inode(ext4_filesystem_t *fs,
     ext4_inode_ref_t **inode_ref, int flags)
 {
@@ -943,5 +943,5 @@
 	/* Allocate inode by allocation algorithm */
 	uint32_t index;
-	int rc = ext4_ialloc_alloc_inode(fs, &index, is_dir);
+	errno_t rc = ext4_ialloc_alloc_inode(fs, &index, is_dir);
 	if (rc != EOK)
 		return rc;
@@ -1025,5 +1025,5 @@
  *
  */
-int ext4_filesystem_free_inode(ext4_inode_ref_t *inode_ref)
+errno_t ext4_filesystem_free_inode(ext4_inode_ref_t *inode_ref)
 {
 	ext4_filesystem_t *fs = inode_ref->fs;
@@ -1042,5 +1042,5 @@
 	uint32_t fblock = ext4_inode_get_indirect_block(inode_ref->inode, 0);
 	if (fblock != 0) {
-		int rc = ext4_balloc_free_block(inode_ref, fblock);
+		errno_t rc = ext4_balloc_free_block(inode_ref, fblock);
 		if (rc != EOK)
 			return rc;
@@ -1056,5 +1056,5 @@
 	fblock = ext4_inode_get_indirect_block(inode_ref->inode, 1);
 	if (fblock != 0) {
-		int rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
+		errno_t rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
 		if (rc != EOK)
 			return rc;
@@ -1088,5 +1088,5 @@
 	fblock = ext4_inode_get_indirect_block(inode_ref->inode, 2);
 	if (fblock != 0) {
-		int rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
+		errno_t rc = block_get(&block, fs->device, fblock, BLOCK_FLAGS_NONE);
 		if (rc != EOK)
 			return rc;
@@ -1153,5 +1153,5 @@
 	    inode_ref->inode, fs->superblock);
 	if (xattr_block) {
-		int rc = ext4_balloc_free_block(inode_ref, xattr_block);
+		errno_t rc = ext4_balloc_free_block(inode_ref, xattr_block);
 		if (rc != EOK)
 			return rc;
@@ -1161,5 +1161,5 @@
 	
 	/* Free inode by allocator */
-	int rc;
+	errno_t rc;
 	if (ext4_inode_is_type(fs->superblock, inode_ref->inode,
 	    EXT4_INODE_MODE_DIRECTORY))
@@ -1179,5 +1179,5 @@
  *
  */
-int ext4_filesystem_truncate_inode(ext4_inode_ref_t *inode_ref,
+errno_t ext4_filesystem_truncate_inode(ext4_inode_ref_t *inode_ref,
     aoff64_t new_size)
 {
@@ -1212,5 +1212,5 @@
 	    (ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS))) {
 		/* Extents require special operation */
-		int rc = ext4_extent_release_blocks_from(inode_ref,
+		errno_t rc = ext4_extent_release_blocks_from(inode_ref,
 		    old_blocks_count - diff_blocks_count);
 		if (rc != EOK)
@@ -1221,5 +1221,5 @@
 		/* Starting from 1 because of logical blocks are numbered from 0 */
 		for (uint32_t i = 1; i <= diff_blocks_count; ++i) {
-			int rc = ext4_filesystem_release_inode_block(inode_ref,
+			errno_t rc = ext4_filesystem_release_inode_block(inode_ref,
 			    old_blocks_count - i);
 			if (rc != EOK)
@@ -1244,5 +1244,5 @@
  *
  */
-int ext4_filesystem_get_inode_data_block_index(ext4_inode_ref_t *inode_ref,
+errno_t ext4_filesystem_get_inode_data_block_index(ext4_inode_ref_t *inode_ref,
     aoff64_t iblock, uint32_t *fblock)
 {
@@ -1261,5 +1261,5 @@
 	    EXT4_FEATURE_INCOMPAT_EXTENTS)) &&
 	    (ext4_inode_has_flag(inode_ref->inode, EXT4_INODE_FLAG_EXTENTS))) {
-		int rc = ext4_extent_find_block(inode_ref, iblock, &current_block);
+		errno_t rc = ext4_extent_find_block(inode_ref, iblock, &current_block);
 		if (rc != EOK)
 			return rc;
@@ -1311,5 +1311,5 @@
 	while (level > 0) {
 		/* Load indirect block */
-		int rc = block_get(&block, fs->device, current_block, 0);
+		errno_t rc = block_get(&block, fs->device, current_block, 0);
 		if (rc != EOK)
 			return rc;
@@ -1357,5 +1357,5 @@
  *
  */
-int ext4_filesystem_set_inode_data_block_index(ext4_inode_ref_t *inode_ref,
+errno_t ext4_filesystem_set_inode_data_block_index(ext4_inode_ref_t *inode_ref,
     aoff64_t iblock, uint32_t fblock)
 {
@@ -1407,5 +1407,5 @@
 	if (current_block == 0) {
 		/* Allocate new indirect block */
-		int rc = ext4_balloc_alloc_block(inode_ref, &new_block_addr);
+		errno_t rc = ext4_balloc_alloc_block(inode_ref, &new_block_addr);
 		if (rc != EOK)
 			return rc;
@@ -1441,5 +1441,5 @@
 	 */
 	while (level > 0) {
-		int rc = block_get(&block, fs->device, current_block, 0);
+		errno_t rc = block_get(&block, fs->device, current_block, 0);
 		if (rc != EOK)
 			return rc;
@@ -1518,5 +1518,5 @@
  *
  */
-int ext4_filesystem_release_inode_block(ext4_inode_ref_t *inode_ref,
+errno_t ext4_filesystem_release_inode_block(ext4_inode_ref_t *inode_ref,
     uint32_t iblock)
 {
@@ -1575,5 +1575,5 @@
 			return EOK;
 		
-		int rc = block_get(&block, fs->device, current_block, 0);
+		errno_t rc = block_get(&block, fs->device, current_block, 0);
 		if (rc != EOK)
 			return rc;
@@ -1625,5 +1625,5 @@
  *
  */
-int ext4_filesystem_append_inode_block(ext4_inode_ref_t *inode_ref,
+errno_t ext4_filesystem_append_inode_block(ext4_inode_ref_t *inode_ref,
     uint32_t *fblock, uint32_t *iblock)
 {
@@ -1649,5 +1649,5 @@
 	/* Allocate new physical block */
 	uint32_t phys_block;
-	int rc = ext4_balloc_alloc_block(inode_ref, &phys_block);
+	errno_t rc = ext4_balloc_alloc_block(inode_ref, &phys_block);
 	if (rc != EOK)
 		return rc;
Index: uspace/lib/ext4/src/hash.c
===================================================================
--- uspace/lib/ext4/src/hash.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/hash.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -38,5 +38,5 @@
 #include "ext4/hash.h"
 
-int ext4_hash_string(ext4_hash_info_t *hinfo, int len, const char *name)
+errno_t ext4_hash_string(ext4_hash_info_t *hinfo, int len, const char *name)
 {
 	// TODO
Index: uspace/lib/ext4/src/ialloc.c
===================================================================
--- uspace/lib/ext4/src/ialloc.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/ialloc.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -97,5 +97,5 @@
  *
  */
-int ext4_ialloc_free_inode(ext4_filesystem_t *fs, uint32_t index, bool is_dir)
+errno_t ext4_ialloc_free_inode(ext4_filesystem_t *fs, uint32_t index, bool is_dir)
 {
 	ext4_superblock_t *sb = fs->superblock;
@@ -105,5 +105,5 @@
 	
 	ext4_block_group_ref_t *bg_ref;
-	int rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
+	errno_t rc = ext4_filesystem_get_block_group_ref(fs, block_group, &bg_ref);
 	if (rc != EOK)
 		return rc;
@@ -175,5 +175,5 @@
  *
  */
-int ext4_ialloc_alloc_inode(ext4_filesystem_t *fs, uint32_t *index, bool is_dir)
+errno_t ext4_ialloc_alloc_inode(ext4_filesystem_t *fs, uint32_t *index, bool is_dir)
 {
 	ext4_superblock_t *sb = fs->superblock;
@@ -188,5 +188,5 @@
 		/* Load block group to check */
 		ext4_block_group_ref_t *bg_ref;
-		int rc = ext4_filesystem_get_block_group_ref(fs, bgid, &bg_ref);
+		errno_t rc = ext4_filesystem_get_block_group_ref(fs, bgid, &bg_ref);
 		if (rc != EOK)
 			return rc;
Index: uspace/lib/ext4/src/inode.c
===================================================================
--- uspace/lib/ext4/src/inode.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/inode.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -324,5 +324,5 @@
  *
  */
-int ext4_inode_set_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode,
+errno_t ext4_inode_set_blocks_count(ext4_superblock_t *sb, ext4_inode_t *inode,
     uint64_t count)
 {
Index: uspace/lib/ext4/src/ops.c
===================================================================
--- uspace/lib/ext4/src/ops.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/ops.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -58,23 +58,23 @@
 /* Forward declarations of auxiliary functions */
 
-static int ext4_read_directory(ipc_callid_t, aoff64_t, size_t,
+static errno_t ext4_read_directory(ipc_callid_t, aoff64_t, size_t,
     ext4_instance_t *, ext4_inode_ref_t *, size_t *);
-static int ext4_read_file(ipc_callid_t, aoff64_t, size_t, ext4_instance_t *,
+static errno_t ext4_read_file(ipc_callid_t, aoff64_t, size_t, ext4_instance_t *,
     ext4_inode_ref_t *, size_t *);
 static bool ext4_is_dots(const uint8_t *, size_t);
-static int ext4_instance_get(service_id_t, ext4_instance_t **);
+static errno_t ext4_instance_get(service_id_t, ext4_instance_t **);
 
 /* Forward declarations of ext4 libfs operations. */
 
-static int ext4_root_get(fs_node_t **, service_id_t);
-static int ext4_match(fs_node_t **, fs_node_t *, const char *);
-static int ext4_node_get(fs_node_t **, service_id_t, fs_index_t);
-static int ext4_node_open(fs_node_t *);
-       int ext4_node_put(fs_node_t *);
-static int ext4_create_node(fs_node_t **, service_id_t, int);
-static int ext4_destroy_node(fs_node_t *);
-static int ext4_link(fs_node_t *, fs_node_t *, const char *);
-static int ext4_unlink(fs_node_t *, fs_node_t *, const char *);
-static int ext4_has_children(bool *, fs_node_t *);
+static errno_t ext4_root_get(fs_node_t **, service_id_t);
+static errno_t ext4_match(fs_node_t **, fs_node_t *, const char *);
+static errno_t ext4_node_get(fs_node_t **, service_id_t, fs_index_t);
+static errno_t ext4_node_open(fs_node_t *);
+       errno_t ext4_node_put(fs_node_t *);
+static errno_t ext4_create_node(fs_node_t **, service_id_t, int);
+static errno_t ext4_destroy_node(fs_node_t *);
+static errno_t ext4_link(fs_node_t *, fs_node_t *, const char *);
+static errno_t ext4_unlink(fs_node_t *, fs_node_t *, const char *);
+static errno_t ext4_has_children(bool *, fs_node_t *);
 static fs_index_t ext4_index_get(fs_node_t *);
 static aoff64_t ext4_size_get(fs_node_t *);
@@ -83,7 +83,7 @@
 static bool ext4_is_file(fs_node_t *node);
 static service_id_t ext4_service_get(fs_node_t *node);
-static int ext4_size_block(service_id_t, uint32_t *);
-static int ext4_total_block_count(service_id_t, uint64_t *);
-static int ext4_free_block_count(service_id_t, uint64_t *);
+static errno_t ext4_size_block(service_id_t, uint32_t *);
+static errno_t ext4_total_block_count(service_id_t, uint64_t *);
+static errno_t ext4_free_block_count(service_id_t, uint64_t *);
 
 /* Static variables */
@@ -138,5 +138,5 @@
  *
  */
-int ext4_global_init(void)
+errno_t ext4_global_init(void)
 {
 	if (!hash_table_create(&open_nodes, 0, 0, &open_nodes_ops))
@@ -152,5 +152,5 @@
  * @return Error code
  */
-int ext4_global_fini(void)
+errno_t ext4_global_fini(void)
 {
 	hash_table_destroy(&open_nodes);
@@ -170,5 +170,5 @@
  *
  */
-int ext4_instance_get(service_id_t service_id, ext4_instance_t **inst)
+errno_t ext4_instance_get(service_id_t service_id, ext4_instance_t **inst)
 {
 	fibril_mutex_lock(&instance_list_mutex);
@@ -199,5 +199,5 @@
  *
  */
-int ext4_root_get(fs_node_t **rfn, service_id_t service_id)
+errno_t ext4_root_get(fs_node_t **rfn, service_id_t service_id)
 {
 	return ext4_node_get(rfn, service_id, EXT4_INODE_ROOT_INDEX);
@@ -215,5 +215,5 @@
  *
  */
-int ext4_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
+errno_t ext4_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
 	ext4_node_t *eparent = EXT4_NODE(pfn);
@@ -226,5 +226,5 @@
 	/* Try to find entry */
 	ext4_directory_search_result_t result;
-	int rc = ext4_directory_find_entry(&result, eparent->inode_ref,
+	errno_t rc = ext4_directory_find_entry(&result, eparent->inode_ref,
 	    component);
 	if (rc != EOK) {
@@ -247,5 +247,5 @@
 
 	/* Destroy search result structure */
-	int const rc2 = ext4_directory_destroy_result(&result);
+	errno_t const rc2 = ext4_directory_destroy_result(&result);
 	return rc == EOK ? rc2 : rc;
 }
@@ -262,8 +262,8 @@
  *
  */
-int ext4_node_get(fs_node_t **rfn, service_id_t service_id, fs_index_t index)
+errno_t ext4_node_get(fs_node_t **rfn, service_id_t service_id, fs_index_t index)
 {
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK)
 		return rc;
@@ -281,5 +281,5 @@
  *
  */
-int ext4_node_get_core(fs_node_t **rfn, ext4_instance_t *inst,
+errno_t ext4_node_get_core(fs_node_t **rfn, ext4_instance_t *inst,
     fs_index_t index)
 {
@@ -322,5 +322,5 @@
 	/* Load i-node from filesystem */
 	ext4_inode_ref_t *inode_ref;
-	int rc = ext4_filesystem_get_inode_ref(inst->filesystem, index,
+	errno_t rc = ext4_filesystem_get_inode_ref(inst->filesystem, index,
 	    &inode_ref);
 	if (rc != EOK) {
@@ -355,5 +355,5 @@
  *
  */
-static int ext4_node_put_core(ext4_node_t *enode)
+static errno_t ext4_node_put_core(ext4_node_t *enode)
 {
 	hash_table_remove_item(&open_nodes, &enode->link);
@@ -362,5 +362,5 @@
 	
 	/* Put inode back in filesystem */
-	int rc = ext4_filesystem_put_inode_ref(enode->inode_ref);
+	errno_t rc = ext4_filesystem_put_inode_ref(enode->inode_ref);
 	if (rc != EOK)
 		return rc;
@@ -382,5 +382,5 @@
  *
  */
-int ext4_node_open(fs_node_t *fn)
+errno_t ext4_node_open(fs_node_t *fn)
 {
 	/* Stateless operation */
@@ -396,5 +396,5 @@
  *
  */
-int ext4_node_put(fs_node_t *fn)
+errno_t ext4_node_put(fs_node_t *fn)
 {
 	fibril_mutex_lock(&open_nodes_lock);
@@ -404,5 +404,5 @@
 	enode->references--;
 	if (enode->references == 0) {
-		int rc = ext4_node_put_core(enode);
+		errno_t rc = ext4_node_put_core(enode);
 		if (rc != EOK) {
 			fibril_mutex_unlock(&open_nodes_lock);
@@ -425,5 +425,5 @@
  *
  */
-int ext4_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
+errno_t ext4_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
 {
 	/* Allocate enode */
@@ -443,5 +443,5 @@
 	/* Load instance */
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK) {
 		free(enode);
@@ -486,9 +486,9 @@
  *
  */
-int ext4_destroy_node(fs_node_t *fn)
+errno_t ext4_destroy_node(fs_node_t *fn)
 {
 	/* If directory, check for children */
 	bool has_children;
-	int rc = ext4_has_children(&has_children, fn);
+	errno_t rc = ext4_has_children(&has_children, fn);
 	if (rc != EOK) {
 		ext4_node_put(fn);
@@ -537,5 +537,5 @@
  *
  */
-int ext4_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
+errno_t ext4_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
 	/* Check maximum name length */
@@ -548,5 +548,5 @@
 	
 	/* Add entry to parent directory */
-	int rc = ext4_directory_add_entry(parent->inode_ref, name,
+	errno_t rc = ext4_directory_add_entry(parent->inode_ref, name,
 	    child->inode_ref);
 	if (rc != EOK)
@@ -610,8 +610,8 @@
  *
  */
-int ext4_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *name)
+errno_t ext4_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
 	bool has_children;
-	int rc = ext4_has_children(&has_children, cfn);
+	errno_t rc = ext4_has_children(&has_children, cfn);
 	if (rc != EOK)
 		return rc;
@@ -683,5 +683,5 @@
  *
  */
-int ext4_has_children(bool *has_children, fs_node_t *fn)
+errno_t ext4_has_children(bool *has_children, fs_node_t *fn)
 {
 	ext4_node_t *enode = EXT4_NODE(fn);
@@ -696,5 +696,5 @@
 	
 	ext4_directory_iterator_t it;
-	int rc = ext4_directory_iterator_init(&it, enode->inode_ref, 0);
+	errno_t rc = ext4_directory_iterator_init(&it, enode->inode_ref, 0);
 	if (rc != EOK)
 		return rc;
@@ -824,8 +824,8 @@
 }
 
-int ext4_size_block(service_id_t service_id, uint32_t *size)
+errno_t ext4_size_block(service_id_t service_id, uint32_t *size)
 {
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK)
 		return rc;
@@ -840,8 +840,8 @@
 }
 
-int ext4_total_block_count(service_id_t service_id, uint64_t *count)
+errno_t ext4_total_block_count(service_id_t service_id, uint64_t *count)
 {
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK)
 		return rc;
@@ -856,8 +856,8 @@
 }
 
-int ext4_free_block_count(service_id_t service_id, uint64_t *count)
+errno_t ext4_free_block_count(service_id_t service_id, uint64_t *count)
 {
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK)
 		return rc;
@@ -907,5 +907,5 @@
  * @return Error code
  */
-static int ext4_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
+static errno_t ext4_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
 {
 	return ext4_filesystem_probe(service_id);
@@ -924,5 +924,5 @@
  *
  */
-static int ext4_mounted(service_id_t service_id, const char *opts,
+static errno_t ext4_mounted(service_id_t service_id, const char *opts,
     fs_index_t *index, aoff64_t *size)
 {
@@ -948,5 +948,5 @@
 	/* Initialize the filesystem */
 	aoff64_t rnsize;
-	int rc = ext4_filesystem_open(inst, service_id, cmode, &rnsize, &fs);
+	errno_t rc = ext4_filesystem_open(inst, service_id, cmode, &rnsize, &fs);
 	if (rc != EOK) {
 		free(inst);
@@ -974,8 +974,8 @@
  *
  */
-static int ext4_unmounted(service_id_t service_id)
+static errno_t ext4_unmounted(service_id_t service_id)
 {
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK)
 		return rc;
@@ -1016,5 +1016,5 @@
  *
  */
-static int ext4_read(service_id_t service_id, fs_index_t index, aoff64_t pos,
+static errno_t ext4_read(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *rbytes)
 {
@@ -1030,5 +1030,5 @@
 	
 	ext4_instance_t *inst;
-	int rc = ext4_instance_get(service_id, &inst);
+	errno_t rc = ext4_instance_get(service_id, &inst);
 	if (rc != EOK) {
 		async_answer_0(callid, rc);
@@ -1059,5 +1059,5 @@
 	}
 	
-	int const rc2 = ext4_filesystem_put_inode_ref(inode_ref);
+	errno_t const rc2 = ext4_filesystem_put_inode_ref(inode_ref);
 	
 	return rc == EOK ? rc2 : rc;
@@ -1095,9 +1095,9 @@
  *
  */
-int ext4_read_directory(ipc_callid_t callid, aoff64_t pos, size_t size,
+errno_t ext4_read_directory(ipc_callid_t callid, aoff64_t pos, size_t size,
     ext4_instance_t *inst, ext4_inode_ref_t *inode_ref, size_t *rbytes)
 {
 	ext4_directory_iterator_t it;
-	int rc = ext4_directory_iterator_init(&it, inode_ref, pos);
+	errno_t rc = ext4_directory_iterator_init(&it, inode_ref, pos);
 	if (rc != EOK) {
 		async_answer_0(callid, rc);
@@ -1186,5 +1186,5 @@
  *
  */
-int ext4_read_file(ipc_callid_t callid, aoff64_t pos, size_t size,
+errno_t ext4_read_file(ipc_callid_t callid, aoff64_t pos, size_t size,
     ext4_instance_t *inst, ext4_inode_ref_t *inode_ref, size_t *rbytes)
 {
@@ -1211,5 +1211,5 @@
 	/* Get the real block number */
 	uint32_t fs_block;
-	int rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
+	errno_t rc = ext4_filesystem_get_inode_data_block_index(inode_ref,
 	    file_block, &fs_block);
 	if (rc != EOK) {
@@ -1275,9 +1275,9 @@
  *
  */
-static int ext4_write(service_id_t service_id, fs_index_t index, aoff64_t pos,
+static errno_t ext4_write(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *wbytes, aoff64_t *nsize)
 {
 	fs_node_t *fn;
-	int rc = ext4_node_get(&fn, service_id, index);
+	errno_t rc = ext4_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
@@ -1397,5 +1397,5 @@
 	;
 
-	int const rc2 = ext4_node_put(fn);
+	errno_t const rc2 = ext4_node_put(fn);
 	return rc == EOK ? rc2 : rc;
 }
@@ -1412,9 +1412,9 @@
  *
  */
-static int ext4_truncate(service_id_t service_id, fs_index_t index,
+static errno_t ext4_truncate(service_id_t service_id, fs_index_t index,
     aoff64_t new_size)
 {
 	fs_node_t *fn;
-	int rc = ext4_node_get(&fn, service_id, index);
+	errno_t rc = ext4_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
@@ -1424,5 +1424,5 @@
 	
 	rc = ext4_filesystem_truncate_inode(inode_ref, new_size);
-	int const rc2 = ext4_node_put(fn);
+	errno_t const rc2 = ext4_node_put(fn);
 	
 	return rc == EOK ? rc2 : rc;
@@ -1437,5 +1437,5 @@
  *
  */
-static int ext4_close(service_id_t service_id, fs_index_t index)
+static errno_t ext4_close(service_id_t service_id, fs_index_t index)
 {
 	return EOK;
@@ -1450,8 +1450,8 @@
  *
  */
-static int ext4_destroy(service_id_t service_id, fs_index_t index)
+static errno_t ext4_destroy(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn;
-	int rc = ext4_node_get(&fn, service_id, index);
+	errno_t rc = ext4_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
@@ -1467,8 +1467,8 @@
  *
  */
-static int ext4_sync(service_id_t service_id, fs_index_t index)
+static errno_t ext4_sync(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn;
-	int rc = ext4_node_get(&fn, service_id, index);
+	errno_t rc = ext4_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
Index: uspace/lib/ext4/src/superblock.c
===================================================================
--- uspace/lib/ext4/src/superblock.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/ext4/src/superblock.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -1127,5 +1127,5 @@
  *
  */
-int ext4_superblock_read_direct(service_id_t service_id, ext4_superblock_t **sb)
+errno_t ext4_superblock_read_direct(service_id_t service_id, ext4_superblock_t **sb)
 {
 	/* Allocated memory for superblock structure */
@@ -1135,5 +1135,5 @@
 	
 	/* Read data from block device */
-	int rc = block_read_bytes_direct(service_id, EXT4_SUPERBLOCK_OFFSET,
+	errno_t rc = block_read_bytes_direct(service_id, EXT4_SUPERBLOCK_OFFSET,
 	    EXT4_SUPERBLOCK_SIZE, data);
 	
@@ -1157,9 +1157,9 @@
  *
  */
-int ext4_superblock_write_direct(service_id_t service_id, ext4_superblock_t *sb)
+errno_t ext4_superblock_write_direct(service_id_t service_id, ext4_superblock_t *sb)
 {
 	/* Load physical block size from block device */
 	size_t phys_block_size;
-	int rc = block_get_bsize(service_id, &phys_block_size);
+	errno_t rc = block_get_bsize(service_id, &phys_block_size);
 	if (rc != EOK)
 		return rc;
@@ -1199,5 +1199,5 @@
  *
  */
-int ext4_superblock_check_sanity(ext4_superblock_t *sb)
+errno_t ext4_superblock_check_sanity(ext4_superblock_t *sb)
 {
 	if (ext4_superblock_get_magic(sb) != EXT4_SUPERBLOCK_MAGIC)
