Index: uspace/srv/fs/exfat/exfat_ops.c
===================================================================
--- uspace/srv/fs/exfat/exfat_ops.c	(revision 38d150e6238ab44c861f6486e46454e07caeb0f0)
+++ uspace/srv/fs/exfat/exfat_ops.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -72,14 +72,14 @@
  */
 
-static int exfat_root_get(fs_node_t **, service_id_t);
-static int exfat_match(fs_node_t **, fs_node_t *, const char *);
-static int exfat_node_get(fs_node_t **, service_id_t, fs_index_t);
-static int exfat_node_open(fs_node_t *);
-/* static int exfat_node_put(fs_node_t *); */
-static int exfat_create_node(fs_node_t **, service_id_t, int);
-static int exfat_destroy_node(fs_node_t *);
-static int exfat_link(fs_node_t *, fs_node_t *, const char *);
-static int exfat_unlink(fs_node_t *, fs_node_t *, const char *);
-static int exfat_has_children(bool *, fs_node_t *);
+static errno_t exfat_root_get(fs_node_t **, service_id_t);
+static errno_t exfat_match(fs_node_t **, fs_node_t *, const char *);
+static errno_t exfat_node_get(fs_node_t **, service_id_t, fs_index_t);
+static errno_t exfat_node_open(fs_node_t *);
+/* static errno_t exfat_node_put(fs_node_t *); */
+static errno_t exfat_create_node(fs_node_t **, service_id_t, int);
+static errno_t exfat_destroy_node(fs_node_t *);
+static errno_t exfat_link(fs_node_t *, fs_node_t *, const char *);
+static errno_t exfat_unlink(fs_node_t *, fs_node_t *, const char *);
+static errno_t exfat_has_children(bool *, fs_node_t *);
 static fs_index_t exfat_index_get(fs_node_t *);
 static aoff64_t exfat_size_get(fs_node_t *);
@@ -88,7 +88,7 @@
 static bool exfat_is_file(fs_node_t *node);
 static service_id_t exfat_service_get(fs_node_t *node);
-static int exfat_size_block(service_id_t, uint32_t *);
-static int exfat_total_block_count(service_id_t, uint64_t *);
-static int exfat_free_block_count(service_id_t, uint64_t *);
+static errno_t exfat_size_block(service_id_t, uint32_t *);
+static errno_t exfat_total_block_count(service_id_t, uint64_t *);
+static errno_t exfat_free_block_count(service_id_t, uint64_t *);
 
 /*
@@ -114,7 +114,7 @@
 }
 
-static int exfat_node_sync(exfat_node_t *node)
-{
-	int rc;
+static errno_t exfat_node_sync(exfat_node_t *node)
+{
+	errno_t rc;
 	exfat_directory_t di;
 	exfat_file_dentry_t df;
@@ -155,7 +155,7 @@
 }
 
-static int exfat_node_fini_by_service_id(service_id_t service_id)
-{
-	int rc;
+static errno_t exfat_node_fini_by_service_id(service_id_t service_id)
+{
+	errno_t rc;
 
 	/*
@@ -211,9 +211,9 @@
 }
 
-static int exfat_node_get_new(exfat_node_t **nodepp)
+static errno_t exfat_node_get_new(exfat_node_t **nodepp)
 {
 	fs_node_t *fn;
 	exfat_node_t *nodep;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&ffn_mutex);
@@ -269,5 +269,5 @@
 }
 
-static int exfat_node_get_new_by_pos(exfat_node_t **nodepp, 
+static errno_t exfat_node_get_new_by_pos(exfat_node_t **nodepp, 
     service_id_t service_id, exfat_cluster_t pfc, unsigned pdi)
 {
@@ -287,10 +287,10 @@
  * @param idxp		Locked index structure.
  */
-static int exfat_node_get_core(exfat_node_t **nodepp, exfat_idx_t *idxp)
+static errno_t exfat_node_get_core(exfat_node_t **nodepp, exfat_idx_t *idxp)
 {
 	exfat_dentry_t *d;
 	exfat_node_t *nodep = NULL;
 	exfat_directory_t di;
-	int rc;
+	errno_t rc;
 
 	if (idxp->nodep) {
@@ -398,9 +398,9 @@
 }
 
-int exfat_node_expand(service_id_t service_id, exfat_node_t *nodep,
+errno_t exfat_node_expand(service_id_t service_id, exfat_node_t *nodep,
     exfat_cluster_t clusters)
 {
 	exfat_bs_t *bs;
-	int rc;
+	errno_t rc;
 	bs = block_bb_get(service_id);
 
@@ -443,9 +443,9 @@
 }
 
-static int exfat_node_shrink(service_id_t service_id, exfat_node_t *nodep,
+static errno_t exfat_node_shrink(service_id_t service_id, exfat_node_t *nodep,
     aoff64_t size)
 {
 	exfat_bs_t *bs;
-	int rc;
+	errno_t rc;
 	bs = block_bb_get(service_id);
 
@@ -491,15 +491,15 @@
  */
 
-int exfat_root_get(fs_node_t **rfn, service_id_t service_id)
+errno_t exfat_root_get(fs_node_t **rfn, service_id_t service_id)
 {
 	return exfat_node_get(rfn, service_id, EXFAT_ROOT_IDX);
 }
 
-int exfat_bitmap_get(fs_node_t **rfn, service_id_t service_id)
+errno_t exfat_bitmap_get(fs_node_t **rfn, service_id_t service_id)
 {
 	return exfat_node_get(rfn, service_id, EXFAT_BITMAP_IDX);
 }
 
-int exfat_uctable_get(fs_node_t **rfn, service_id_t service_id)
+errno_t exfat_uctable_get(fs_node_t **rfn, service_id_t service_id)
 {
 	return exfat_node_get(rfn, service_id, EXFAT_UCTABLE_IDX);
@@ -507,5 +507,5 @@
 
 
-int exfat_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
+errno_t exfat_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
 	exfat_node_t *parentp = EXFAT_NODE(pfn);
@@ -514,5 +514,5 @@
 	exfat_stream_dentry_t ds;
 	service_id_t service_id;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&parentp->idx->lock);
@@ -565,9 +565,9 @@
 
 /** Instantiate a exFAT in-core node. */
-int exfat_node_get(fs_node_t **rfn, service_id_t service_id, fs_index_t index)
+errno_t exfat_node_get(fs_node_t **rfn, service_id_t service_id, fs_index_t index)
 {
 	exfat_node_t *nodep;
 	exfat_idx_t *idxp;
-	int rc;
+	errno_t rc;
 
 	idxp = exfat_idx_get_by_index(service_id, index);
@@ -584,5 +584,5 @@
 }
 
-int exfat_node_open(fs_node_t *fn)
+errno_t exfat_node_open(fs_node_t *fn)
 {
 	/*
@@ -593,5 +593,5 @@
 }
 
-int exfat_node_put(fs_node_t *fn)
+errno_t exfat_node_put(fs_node_t *fn)
 {
 	if (fn == NULL)
@@ -625,10 +625,10 @@
 }
 
-int exfat_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
+errno_t exfat_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
 {
 	exfat_idx_t *idxp;
 	exfat_node_t *nodep;
 	exfat_bs_t *bs;
-	int rc;
+	errno_t rc;
 
 	bs = block_bb_get(service_id);
@@ -677,10 +677,10 @@
 }
 
-int exfat_destroy_node(fs_node_t *fn)
+errno_t exfat_destroy_node(fs_node_t *fn)
 {
 	exfat_node_t *nodep = EXFAT_NODE(fn);
 	exfat_bs_t *bs;
 	bool has_children;
-	int rc;
+	errno_t rc;
 
 	/*
@@ -718,10 +718,10 @@
 }
 
-int exfat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
+errno_t exfat_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
 	exfat_node_t *parentp = EXFAT_NODE(pfn);
 	exfat_node_t *childp = EXFAT_NODE(cfn);
 	exfat_directory_t di;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&childp->lock);
@@ -783,10 +783,10 @@
 }
 
-int exfat_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
+errno_t exfat_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *nm)
 {
 	exfat_node_t *parentp = EXFAT_NODE(pfn);
 	exfat_node_t *childp = EXFAT_NODE(cfn);
 	bool has_children;
-	int rc;
+	errno_t rc;
 
 	if (!parentp)
@@ -838,10 +838,10 @@
 }
 
-int exfat_has_children(bool *has_children, fs_node_t *fn)
+errno_t exfat_has_children(bool *has_children, fs_node_t *fn)
 {
 	exfat_directory_t di;
 	exfat_dentry_t *d;
 	exfat_node_t *nodep = EXFAT_NODE(fn);
-	int rc;
+	errno_t rc;
 
 	*has_children = false;
@@ -915,5 +915,5 @@
 }
 
-int exfat_size_block(service_id_t service_id, uint32_t *size)
+errno_t exfat_size_block(service_id_t service_id, uint32_t *size)
 {
 	exfat_bs_t *bs;
@@ -924,5 +924,5 @@
 }
 
-int exfat_total_block_count(service_id_t service_id, uint64_t *count)
+errno_t exfat_total_block_count(service_id_t service_id, uint64_t *count)
 {
 	exfat_bs_t *bs;
@@ -933,5 +933,5 @@
 }
 
-int exfat_free_block_count(service_id_t service_id, uint64_t *count)
+errno_t exfat_free_block_count(service_id_t service_id, uint64_t *count)
 {
 	fs_node_t *node = NULL;
@@ -941,5 +941,5 @@
 	uint64_t block_count;
 	unsigned sector;
-	int rc;
+	errno_t rc;
 
 	rc = exfat_total_block_count(service_id, &block_count);
@@ -1015,8 +1015,8 @@
 };
 
-static int exfat_fs_open(service_id_t service_id, enum cache_mode cmode,
+static errno_t exfat_fs_open(service_id_t service_id, enum cache_mode cmode,
     fs_node_t **rrfn, exfat_idx_t **rridxp, vfs_fs_probe_info_t *info)
 {
-	int rc;
+	errno_t rc;
 	exfat_node_t *rootp = NULL, *bitmapp = NULL, *uctablep = NULL;
 	exfat_bs_t *bs;
@@ -1267,7 +1267,7 @@
 */
 
-static int exfat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
-{
-	int rc;
+static errno_t exfat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
+{
+	errno_t rc;
 	exfat_idx_t *ridxp;
 	fs_node_t *rfn;
@@ -1281,9 +1281,9 @@
 }
 
-static int
+static errno_t
 exfat_mounted(service_id_t service_id, const char *opts, fs_index_t *index,
     aoff64_t *size)
 {
-	int rc;
+	errno_t rc;
 	enum cache_mode cmode;
 	exfat_idx_t *ridxp;
@@ -1306,8 +1306,8 @@
 }
 
-static int exfat_unmounted(service_id_t service_id)
+static errno_t exfat_unmounted(service_id_t service_id)
 {
 	fs_node_t *rfn;
-	int rc;
+	errno_t rc;
 
 	rc = exfat_root_get(&rfn, service_id);
@@ -1319,5 +1319,5 @@
 }
 
-static int
+static errno_t
 exfat_read(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *rbytes)
@@ -1328,5 +1328,5 @@
 	size_t bytes = 0;
 	block_t *b;
-	int rc;
+	errno_t rc;
 
 	rc = exfat_node_get(&fn, service_id, index);
@@ -1438,13 +1438,13 @@
 }
 
-static int exfat_close(service_id_t service_id, fs_index_t index)
-{
-	return EOK;
-}
-
-static int exfat_sync(service_id_t service_id, fs_index_t index)
+static errno_t exfat_close(service_id_t service_id, fs_index_t index)
+{
+	return EOK;
+}
+
+static errno_t exfat_sync(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn;
-	int rc = exfat_node_get(&fn, service_id, index);
+	errno_t rc = exfat_node_get(&fn, service_id, index);
 	if (rc != EOK)
 		return rc;
@@ -1461,5 +1461,5 @@
 }
 
-static int
+static errno_t
 exfat_write(service_id_t service_id, fs_index_t index, aoff64_t pos,
     size_t *wbytes, aoff64_t *nsize)
@@ -1472,5 +1472,5 @@
 	aoff64_t boundary;
 	int flags = BLOCK_FLAGS_NONE;
-	int rc;
+	errno_t rc;
 
 	rc = exfat_node_get(&fn, service_id, index);
@@ -1548,5 +1548,5 @@
 }
 
-static int
+static errno_t
 exfat_truncate(service_id_t service_id, fs_index_t index, aoff64_t size)
 {
@@ -1554,5 +1554,5 @@
 	exfat_node_t *nodep;
 	exfat_bs_t *bs;
-	int rc;
+	errno_t rc;
 
 	rc = exfat_node_get(&fn, service_id, index);
@@ -1584,5 +1584,5 @@
 	}
 
-	int rc2 = exfat_node_put(fn);
+	errno_t rc2 = exfat_node_put(fn);
 	if (rc == EOK && rc2 != EOK)
 		rc = rc2;
@@ -1591,9 +1591,9 @@
 }
 
-static int exfat_destroy(service_id_t service_id, fs_index_t index)
+static errno_t exfat_destroy(service_id_t service_id, fs_index_t index)
 {
 	fs_node_t *fn;
 	exfat_node_t *nodep;
-	int rc;
+	errno_t rc;
 
 	rc = exfat_node_get(&fn, service_id, index);
