Index: uspace/srv/fs/mfs/mfs_ops.c
===================================================================
--- uspace/srv/fs/mfs/mfs_ops.c	(revision 4f302225f2b25aadcba779f5a36656dd5a66959e)
+++ uspace/srv/fs/mfs/mfs_ops.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -41,30 +41,30 @@
 static bool check_magic_number(uint16_t magic, bool *native,
     mfs_version_t *version, bool *longfilenames);
-static int mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst,
+static errno_t mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst,
     fs_index_t index);
-static int mfs_node_put(fs_node_t *fsnode);
-static int mfs_node_open(fs_node_t *fsnode);
+static errno_t mfs_node_put(fs_node_t *fsnode);
+static errno_t mfs_node_open(fs_node_t *fsnode);
 static fs_index_t mfs_index_get(fs_node_t *fsnode);
 static unsigned mfs_lnkcnt_get(fs_node_t *fsnode);
 static bool mfs_is_directory(fs_node_t *fsnode);
 static bool mfs_is_file(fs_node_t *fsnode);
-static int mfs_has_children(bool *has_children, fs_node_t *fsnode);
-static int mfs_root_get(fs_node_t **rfn, service_id_t service_id);
+static errno_t mfs_has_children(bool *has_children, fs_node_t *fsnode);
+static errno_t mfs_root_get(fs_node_t **rfn, service_id_t service_id);
 static service_id_t mfs_service_get(fs_node_t *fsnode);
 static aoff64_t mfs_size_get(fs_node_t *node);
-static int mfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component);
-static int mfs_create_node(fs_node_t **rfn, service_id_t service_id, int flags);
-static int mfs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name);
-static int mfs_unlink(fs_node_t *, fs_node_t *, const char *name);
-static int mfs_destroy_node(fs_node_t *fn);
-static int mfs_node_get(fs_node_t **rfn, service_id_t service_id,
+static errno_t mfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component);
+static errno_t mfs_create_node(fs_node_t **rfn, service_id_t service_id, int flags);
+static errno_t mfs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name);
+static errno_t mfs_unlink(fs_node_t *, fs_node_t *, const char *name);
+static errno_t mfs_destroy_node(fs_node_t *fn);
+static errno_t mfs_node_get(fs_node_t **rfn, service_id_t service_id,
     fs_index_t index);
-static int mfs_instance_get(service_id_t service_id,
+static errno_t mfs_instance_get(service_id_t service_id,
     struct mfs_instance **instance);
-static int mfs_check_sanity(struct mfs_sb_info *sbi);
+static errno_t mfs_check_sanity(struct mfs_sb_info *sbi);
 static bool is_power_of_two(uint32_t n);
-static int mfs_size_block(service_id_t service_id, uint32_t *size);
-static int mfs_total_block_count(service_id_t service_id, uint64_t *count);
-static int mfs_free_block_count(service_id_t service_id, uint64_t *count);
+static errno_t mfs_size_block(service_id_t service_id, uint32_t *size);
+static errno_t mfs_total_block_count(service_id_t service_id, uint64_t *count);
+static errno_t mfs_free_block_count(service_id_t service_id, uint64_t *count);
 
 static hash_table_t open_nodes;
@@ -131,5 +131,5 @@
 };
 
-int
+errno_t
 mfs_global_init(void)
 {
@@ -142,5 +142,5 @@
 /** Read the superblock.
  */
-static int mfs_read_sb(service_id_t service_id, struct mfs_sb_info **rsbi)
+static errno_t mfs_read_sb(service_id_t service_id, struct mfs_sb_info **rsbi)
 {
 	struct mfs_superblock *sb = NULL;
@@ -151,5 +151,5 @@
 	mfs_version_t version;
 	uint16_t magic;
-	int rc;
+	errno_t rc;
 
 	/* Allocate space for generic MFS superblock */
@@ -277,8 +277,8 @@
 
 
-static int mfs_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
+static errno_t mfs_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
 {
 	struct mfs_sb_info *sbi = NULL;
-	int rc;
+	errno_t rc;
 
 	/* Initialize libblock */
@@ -294,5 +294,5 @@
 }
 
-static int
+static errno_t
 mfs_mounted(service_id_t service_id, const char *opts, fs_index_t *index,
     aoff64_t *size)
@@ -301,5 +301,5 @@
 	struct mfs_sb_info *sbi = NULL;
 	struct mfs_instance *instance = NULL;
-	int rc;
+	errno_t rc;
 
 	/* Check for option enabling write through. */
@@ -365,5 +365,5 @@
 }
 
-static int
+static errno_t
 mfs_unmounted(service_id_t service_id)
 {
@@ -372,5 +372,5 @@
 	mfsdebug("%s()\n", __FUNCTION__);
 
-	int r = mfs_instance_get(service_id, &inst);
+	errno_t r = mfs_instance_get(service_id, &inst);
 	if (r != EOK)
 		return r;
@@ -396,8 +396,8 @@
 }
 
-static int
+static errno_t
 mfs_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
 {
-	int r;
+	errno_t r;
 	struct mfs_instance *inst;
 	struct mfs_node *mnode;
@@ -483,5 +483,5 @@
 }
 
-static int
+static errno_t
 mfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
@@ -489,5 +489,5 @@
 	struct mfs_ino_info *ino_i = mnode->ino_i;
 	struct mfs_dentry_info d_info;
-	int r;
+	errno_t r;
 
 	if (!S_ISDIR(ino_i->i_mode))
@@ -530,9 +530,9 @@
 }
 
-static int
+static errno_t
 mfs_node_get(fs_node_t **rfn, service_id_t service_id,
     fs_index_t index)
 {
-	int rc;
+	errno_t rc;
 	struct mfs_instance *instance;
 
@@ -544,8 +544,8 @@
 }
 
-static int
+static errno_t
 mfs_node_put(fs_node_t *fsnode)
 {
-	int rc = EOK;
+	errno_t rc = EOK;
 	struct mfs_node *mnode = fsnode->data;
 
@@ -568,5 +568,5 @@
 }
 
-static int
+static errno_t
 mfs_node_open(fs_node_t *fsnode)
 {
@@ -601,5 +601,5 @@
 }
 
-static int
+static errno_t
 mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst,
     fs_index_t index)
@@ -607,5 +607,5 @@
 	fs_node_t *node = NULL;
 	struct mfs_node *mnode = NULL;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&open_nodes_lock);
@@ -688,12 +688,12 @@
 }
 
-static int
+static errno_t
 mfs_root_get(fs_node_t **rfn, service_id_t service_id)
 {
-	int rc = mfs_node_get(rfn, service_id, MFS_ROOT_INO);
+	errno_t rc = mfs_node_get(rfn, service_id, MFS_ROOT_INO);
 	return rc;
 }
 
-static int
+static errno_t
 mfs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
@@ -706,5 +706,5 @@
 		return ENAMETOOLONG;
 
-	int r = mfs_insert_dentry(parent, name, child->ino_i->index);
+	errno_t r = mfs_insert_dentry(parent, name, child->ino_i->index);
 	if (r != EOK)
 		return r;
@@ -736,5 +736,5 @@
 exit:
 	if (destroy_dentry) {
-		int r2 = mfs_remove_dentry(parent, name);
+		errno_t r2 = mfs_remove_dentry(parent, name);
 		if (r2 != EOK)
 			r = r2;
@@ -746,5 +746,5 @@
 }
 
-static int
+static errno_t
 mfs_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
@@ -752,5 +752,5 @@
 	struct mfs_node *child = cfn->data;
 	bool has_children;
-	int r;
+	errno_t r;
 
 	if (!parent)
@@ -787,10 +787,10 @@
 }
 
-static int
+static errno_t
 mfs_has_children(bool *has_children, fs_node_t *fsnode)
 {
 	struct mfs_node *mnode = fsnode->data;
 	struct mfs_sb_info *sbi = mnode->instance->sbi;
-	int r;
+	errno_t r;
 
 	*has_children = false;
@@ -819,9 +819,9 @@
 }
 
-static int
+static errno_t
 mfs_read(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *rbytes)
 {
-	int rc;
+	errno_t rc;
 	fs_node_t *fn = NULL;
 
@@ -926,15 +926,15 @@
 out_error:
 	;
-	int tmp = mfs_node_put(fn);
+	errno_t tmp = mfs_node_put(fn);
 	async_answer_0(callid, tmp != EOK ? tmp : rc);
 	return tmp != EOK ? tmp : rc;
 }
 
-static int
+static errno_t
 mfs_write(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *wbytes, aoff64_t *nsize)
 {
 	fs_node_t *fn;
-	int r;
+	errno_t r;
 	int flags = BLOCK_FLAGS_NONE;
 
@@ -1015,9 +1015,9 @@
 }
 
-static int
+static errno_t
 mfs_destroy(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn = NULL;
-	int r;
+	errno_t r;
 
 	r = mfs_node_get(&fn, service_id, index);
@@ -1031,10 +1031,10 @@
 }
 
-static int
+static errno_t
 mfs_destroy_node(fs_node_t *fn)
 {
 	struct mfs_node *mnode = fn->data;
 	bool has_children;
-	int r;
+	errno_t r;
 
 	mfsdebug("mfs_destroy_node %d\n", mnode->ino_i->index);
@@ -1059,9 +1059,9 @@
 }
 
-static int
+static errno_t
 mfs_truncate(service_id_t service_id, fs_index_t index, aoff64_t size)
 {
 	fs_node_t *fn;
-	int r;
+	errno_t r;
 
 	r = mfs_node_get(&fn, service_id, index);
@@ -1083,9 +1083,9 @@
 }
 
-static int
+static errno_t
 mfs_instance_get(service_id_t service_id, struct mfs_instance **instance)
 {
 	void *data;
-	int rc;
+	errno_t rc;
 
 	rc = fs_instance_get(service_id, &data);
@@ -1135,5 +1135,5 @@
  * @return EOK on success, ENOTSUP otherwise.
  */
-static int
+static errno_t
 mfs_check_sanity(struct mfs_sb_info *sbi)
 {
@@ -1152,5 +1152,5 @@
 }
 
-static int
+static errno_t
 mfs_close(service_id_t service_id, fs_index_t index)
 {
@@ -1158,9 +1158,9 @@
 }
 
-static int
+static errno_t
 mfs_sync(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn = NULL;
-	int rc = mfs_node_get(&fn, service_id, index);
+	errno_t rc = mfs_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
@@ -1189,9 +1189,9 @@
 }
 
-static int
+static errno_t
 mfs_size_block(service_id_t service_id, uint32_t *size)
 {
 	struct mfs_instance *inst;
-	int rc;
+	errno_t rc;
 
 	rc = mfs_instance_get(service_id, &inst);
@@ -1207,9 +1207,9 @@
 }
 
-static int
+static errno_t
 mfs_total_block_count(service_id_t service_id, uint64_t *count)
 {
 	struct mfs_instance *inst;
-	int rc;
+	errno_t rc;
 	
 	rc = mfs_instance_get(service_id, &inst);
@@ -1225,5 +1225,5 @@
 }
 
-static int
+static errno_t
 mfs_free_block_count(service_id_t service_id, uint64_t *count)
 {
@@ -1231,5 +1231,5 @@
 	
 	struct mfs_instance *inst;
-	int rc = mfs_instance_get(service_id, &inst);
+	errno_t rc = mfs_instance_get(service_id, &inst);
 	if (rc != EOK)
 		return rc;
