Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 38d150e6238ab44c861f6486e46454e07caeb0f0)
+++ uspace/srv/fs/fat/fat_ops.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -73,14 +73,14 @@
  * Forward declarations of FAT libfs operations.
  */
-static int fat_root_get(fs_node_t **, service_id_t);
-static int fat_match(fs_node_t **, fs_node_t *, const char *);
-static int fat_node_get(fs_node_t **, service_id_t, fs_index_t);
-static int fat_node_open(fs_node_t *);
-static int fat_node_put(fs_node_t *);
-static int fat_create_node(fs_node_t **, service_id_t, int);
-static int fat_destroy_node(fs_node_t *);
-static int fat_link(fs_node_t *, fs_node_t *, const char *);
-static int fat_unlink(fs_node_t *, fs_node_t *, const char *);
-static int fat_has_children(bool *, fs_node_t *);
+static errno_t fat_root_get(fs_node_t **, service_id_t);
+static errno_t fat_match(fs_node_t **, fs_node_t *, const char *);
+static errno_t fat_node_get(fs_node_t **, service_id_t, fs_index_t);
+static errno_t fat_node_open(fs_node_t *);
+static errno_t fat_node_put(fs_node_t *);
+static errno_t fat_create_node(fs_node_t **, service_id_t, int);
+static errno_t fat_destroy_node(fs_node_t *);
+static errno_t fat_link(fs_node_t *, fs_node_t *, const char *);
+static errno_t fat_unlink(fs_node_t *, fs_node_t *, const char *);
+static errno_t fat_has_children(bool *, fs_node_t *);
 static fs_index_t fat_index_get(fs_node_t *);
 static aoff64_t fat_size_get(fs_node_t *);
@@ -89,7 +89,7 @@
 static bool fat_is_file(fs_node_t *node);
 static service_id_t fat_service_get(fs_node_t *node);
-static int fat_size_block(service_id_t, uint32_t *);
-static int fat_total_block_count(service_id_t, uint64_t *);
-static int fat_free_block_count(service_id_t, uint64_t *);
+static errno_t fat_size_block(service_id_t, uint32_t *);
+static errno_t fat_total_block_count(service_id_t, uint64_t *);
+static errno_t fat_free_block_count(service_id_t, uint64_t *);
 
 /*
@@ -114,10 +114,10 @@
 }
 
-static int fat_node_sync(fat_node_t *node)
+static errno_t fat_node_sync(fat_node_t *node)
 {
 	block_t *b;
 	fat_bs_t *bs;
 	fat_dentry_t *d;
-	int rc;
+	errno_t rc;
 
 	assert(node->dirty);
@@ -148,7 +148,7 @@
 }
 
-static int fat_node_fini_by_service_id(service_id_t service_id)
-{
-	int rc;
+static errno_t fat_node_fini_by_service_id(service_id_t service_id)
+{
+	errno_t rc;
 
 	/*
@@ -204,9 +204,9 @@
 }
 
-static int fat_node_get_new(fat_node_t **nodepp)
+static errno_t fat_node_get_new(fat_node_t **nodepp)
 {
 	fs_node_t *fn;
 	fat_node_t *nodep;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&ffn_mutex);
@@ -266,5 +266,5 @@
  * @param idxp		Locked index structure.
  */
-static int fat_node_get_core(fat_node_t **nodepp, fat_idx_t *idxp)
+static errno_t fat_node_get_core(fat_node_t **nodepp, fat_idx_t *idxp)
 {
 	block_t *b;
@@ -272,5 +272,5 @@
 	fat_dentry_t *d;
 	fat_node_t *nodep = NULL;
-	int rc;
+	errno_t rc;
 
 	if (idxp->nodep) {
@@ -365,10 +365,10 @@
  */
 
-int fat_root_get(fs_node_t **rfn, service_id_t service_id)
+errno_t fat_root_get(fs_node_t **rfn, service_id_t service_id)
 {
 	return fat_node_get(rfn, service_id, 0);
 }
 
-int fat_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
+errno_t fat_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
 	fat_node_t *parentp = FAT_NODE(pfn);
@@ -376,5 +376,5 @@
 	fat_dentry_t *d;
 	service_id_t service_id;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&parentp->idx->lock);
@@ -426,9 +426,9 @@
 
 /** Instantiate a FAT in-core node. */
-int fat_node_get(fs_node_t **rfn, service_id_t service_id, fs_index_t index)
+errno_t fat_node_get(fs_node_t **rfn, service_id_t service_id, fs_index_t index)
 {
 	fat_node_t *nodep;
 	fat_idx_t *idxp;
-	int rc;
+	errno_t rc;
 
 	idxp = fat_idx_get_by_index(service_id, index);
@@ -445,5 +445,5 @@
 }
 
-int fat_node_open(fs_node_t *fn)
+errno_t fat_node_open(fs_node_t *fn)
 {
 	/*
@@ -454,5 +454,5 @@
 }
 
-int fat_node_put(fs_node_t *fn)
+errno_t fat_node_put(fs_node_t *fn)
 {
 	fat_node_t *nodep = FAT_NODE(fn);
@@ -483,5 +483,5 @@
 }
 
-int fat_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
+errno_t fat_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
 {
 	fat_idx_t *idxp;
@@ -489,5 +489,5 @@
 	fat_bs_t *bs;
 	fat_cluster_t mcl, lcl;
-	int rc;
+	errno_t rc;
 
 	bs = block_bb_get(service_id);
@@ -538,10 +538,10 @@
 }
 
-int fat_destroy_node(fs_node_t *fn)
+errno_t fat_destroy_node(fs_node_t *fn)
 {
 	fat_node_t *nodep = FAT_NODE(fn);
 	fat_bs_t *bs;
 	bool has_children;
-	int rc;
+	errno_t rc;
 
 	/*
@@ -575,5 +575,5 @@
 }
 
-int fat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
+errno_t fat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
 	fat_node_t *parentp = FAT_NODE(pfn);
@@ -584,5 +584,5 @@
 	fat_directory_t di;
 	fat_dentry_t de;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&childp->lock);
@@ -696,10 +696,10 @@
 }
 
-int fat_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
+errno_t fat_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
 {
 	fat_node_t *parentp = FAT_NODE(pfn);
 	fat_node_t *childp = FAT_NODE(cfn);
 	bool has_children;
-	int rc;
+	errno_t rc;
 
 	if (!parentp)
@@ -753,5 +753,5 @@
 }
 
-int fat_has_children(bool *has_children, fs_node_t *fn)
+errno_t fat_has_children(bool *has_children, fs_node_t *fn)
 {
 	fat_bs_t *bs;
@@ -760,5 +760,5 @@
 	block_t *b;
 	unsigned i, j;
-	int rc;
+	errno_t rc;
 
 	if (nodep->type != FAT_DIRECTORY) {
@@ -843,5 +843,5 @@
 }
 
-int fat_size_block(service_id_t service_id, uint32_t *size)
+errno_t fat_size_block(service_id_t service_id, uint32_t *size)
 {
 	fat_bs_t *bs;
@@ -853,5 +853,5 @@
 }
 
-int fat_total_block_count(service_id_t service_id, uint64_t *count)
+errno_t fat_total_block_count(service_id_t service_id, uint64_t *count)
 {
 	fat_bs_t *bs;
@@ -863,10 +863,10 @@
 }
 
-int fat_free_block_count(service_id_t service_id, uint64_t *count)
+errno_t fat_free_block_count(service_id_t service_id, uint64_t *count)
 {
 	fat_bs_t *bs;
 	fat_cluster_t e0;
 	uint64_t block_count;
-	int rc;
+	errno_t rc;
 	uint32_t cluster_no, clusters;
 
@@ -910,9 +910,9 @@
 };
 
-static int fat_fs_open(service_id_t service_id, enum cache_mode cmode,
+static errno_t fat_fs_open(service_id_t service_id, enum cache_mode cmode,
     fs_node_t **rrfn, fat_idx_t **rridxp)
 {
 	fat_bs_t *bs;
-	int rc;
+	errno_t rc;
 
 	/* initialize libblock */
@@ -1037,5 +1037,5 @@
  */
 
-static int fat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
+static errno_t fat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
 {
 	fat_idx_t *ridxp;
@@ -1044,5 +1044,5 @@
 	fat_directory_t di;
 	char label[FAT_VOLLABEL_LEN + 1];
-	int rc;
+	errno_t rc;
 
 	rc = fat_fs_open(service_id, CACHE_MODE_WT, &rfn, &ridxp);
@@ -1076,5 +1076,5 @@
 }
 
-static int
+static errno_t
 fat_mounted(service_id_t service_id, const char *opts, fs_index_t *index,
     aoff64_t *size)
@@ -1084,5 +1084,5 @@
 	fat_idx_t *ridxp;
 	fs_node_t *rfn;
-	int rc;
+	errno_t rc;
 
 	instance = malloc(sizeof(fat_instance_t));
@@ -1125,10 +1125,10 @@
 }
 
-static int fat_update_fat32_fsinfo(service_id_t service_id)
+static errno_t fat_update_fat32_fsinfo(service_id_t service_id)
 {
 	fat_bs_t *bs;
 	fat32_fsinfo_t *info;
 	block_t *b;
-	int rc;
+	errno_t rc;
 
 	bs = block_bb_get(service_id);
@@ -1156,10 +1156,10 @@
 }
 
-static int fat_unmounted(service_id_t service_id)
+static errno_t fat_unmounted(service_id_t service_id)
 {
 	fs_node_t *fn;
 	fat_node_t *nodep;
 	fat_bs_t *bs;
-	int rc;
+	errno_t rc;
 
 	bs = block_bb_get(service_id);
@@ -1208,5 +1208,5 @@
 }
 
-static int
+static errno_t
 fat_read(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *rbytes)
@@ -1217,5 +1217,5 @@
 	size_t bytes;
 	block_t *b;
-	int rc;
+	errno_t rc;
 
 	rc = fat_node_get(&fn, service_id, index);
@@ -1318,5 +1318,5 @@
 }
 
-static int
+static errno_t
 fat_write(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *wbytes, aoff64_t *nsize)
@@ -1329,5 +1329,5 @@
 	aoff64_t boundary;
 	int flags = BLOCK_FLAGS_NONE;
-	int rc;
+	errno_t rc;
 	
 	rc = fat_node_get(&fn, service_id, index);
@@ -1455,5 +1455,5 @@
 }
 
-static int
+static errno_t
 fat_truncate(service_id_t service_id, fs_index_t index, aoff64_t size)
 {
@@ -1461,5 +1461,5 @@
 	fat_node_t *nodep;
 	fat_bs_t *bs;
-	int rc;
+	errno_t rc;
 
 	rc = fat_node_get(&fn, service_id, index);
@@ -1514,14 +1514,14 @@
 }
 
-static int fat_close(service_id_t service_id, fs_index_t index)
-{
-	return EOK;
-}
-
-static int fat_destroy(service_id_t service_id, fs_index_t index)
+static errno_t fat_close(service_id_t service_id, fs_index_t index)
+{
+	return EOK;
+}
+
+static errno_t fat_destroy(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn;
 	fat_node_t *nodep;
-	int rc;
+	errno_t rc;
 
 	rc = fat_node_get(&fn, service_id, index);
@@ -1542,8 +1542,8 @@
 }
 
-static int fat_sync(service_id_t service_id, fs_index_t index)
+static errno_t fat_sync(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn;
-	int rc = fat_node_get(&fn, service_id, index);
+	errno_t rc = fat_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
