Index: uspace/srv/fs/fat/fat.c
===================================================================
--- uspace/srv/fs/fat/fat.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -71,5 +71,5 @@
 	}
 
-	int rc = fat_idx_init();
+	errno_t rc = fat_idx_init();
 	if (rc != EOK)
 		goto err;
Index: uspace/srv/fs/fat/fat.h
===================================================================
--- uspace/srv/fs/fat/fat.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat.h	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -250,5 +250,5 @@
 extern libfs_ops_t fat_libfs_ops;
 
-extern int fat_idx_get_new(fat_idx_t **, service_id_t);
+extern errno_t fat_idx_get_new(fat_idx_t **, service_id_t);
 extern fat_idx_t *fat_idx_get_by_pos(service_id_t, fat_cluster_t, unsigned);
 extern fat_idx_t *fat_idx_get_by_index(service_id_t, fs_index_t);
@@ -257,7 +257,7 @@
 extern void fat_idx_hashout(fat_idx_t *);
 
-extern int fat_idx_init(void);
+extern errno_t fat_idx_init(void);
 extern void fat_idx_fini(void);
-extern int fat_idx_init_by_service_id(service_id_t);
+extern errno_t fat_idx_init_by_service_id(service_id_t);
 extern void fat_idx_fini_by_service_id(service_id_t);
 
Index: uspace/srv/fs/fat/fat_directory.c
===================================================================
--- uspace/srv/fs/fat/fat_directory.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat_directory.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -46,5 +46,5 @@
 #include <stdio.h>
 
-int fat_directory_open(fat_node_t *nodep, fat_directory_t *di)
+errno_t fat_directory_open(fat_node_t *nodep, fat_directory_t *di)
 {
 	di->b = NULL;
@@ -62,7 +62,7 @@
 }
 
-int fat_directory_close(fat_directory_t *di)
-{
-	int rc = EOK;
+errno_t fat_directory_close(fat_directory_t *di)
+{
+	errno_t rc = EOK;
 	
 	if (di->b)
@@ -72,8 +72,8 @@
 }
 
-static int fat_directory_block_load(fat_directory_t *di)
+static errno_t fat_directory_block_load(fat_directory_t *di)
 {
 	uint32_t i;
-	int rc;
+	errno_t rc;
 
 	i = (di->pos * sizeof(fat_dentry_t)) / BPS(di->bs);
@@ -98,7 +98,7 @@
 }
 
-int fat_directory_next(fat_directory_t *di)
-{
-	int rc;
+errno_t fat_directory_next(fat_directory_t *di)
+{
+	errno_t rc;
 
 	di->pos += 1;
@@ -110,7 +110,7 @@
 }
 
-int fat_directory_prev(fat_directory_t *di)
-{
-	int rc = EOK;
+errno_t fat_directory_prev(fat_directory_t *di)
+{
+	errno_t rc = EOK;
 	
 	if (di->pos > 0) {
@@ -126,8 +126,8 @@
 }
 
-int fat_directory_seek(fat_directory_t *di, aoff64_t pos)
+errno_t fat_directory_seek(fat_directory_t *di, aoff64_t pos)
 {
 	aoff64_t _pos = di->pos;
-	int rc;
+	errno_t rc;
 
 	di->pos = pos;
@@ -139,7 +139,7 @@
 }
 
-int fat_directory_get(fat_directory_t *di, fat_dentry_t **d)
-{
-	int rc;
+errno_t fat_directory_get(fat_directory_t *di, fat_dentry_t **d)
+{
+	errno_t rc;
 	
 	rc = fat_directory_block_load(di);
@@ -152,5 +152,5 @@
 }
 
-int fat_directory_read(fat_directory_t *di, char *name, fat_dentry_t **de)
+errno_t fat_directory_read(fat_directory_t *di, char *name, fat_dentry_t **de)
 {
 	fat_dentry_t *d = NULL;
@@ -160,5 +160,5 @@
 	int long_entry_count = 0;
 	uint8_t checksum = 0;
-	int rc;
+	errno_t rc;
 
 	void *data;
@@ -236,7 +236,7 @@
 }
 
-int fat_directory_erase(fat_directory_t *di)
-{
-	int rc;
+errno_t fat_directory_erase(fat_directory_t *di)
+{
+	errno_t rc;
 	fat_dentry_t *d;
 	bool flag = false;
@@ -267,7 +267,7 @@
 }
 
-int fat_directory_write(fat_directory_t *di, const char *name, fat_dentry_t *de)
-{
-	int rc;
+errno_t fat_directory_write(fat_directory_t *di, const char *name, fat_dentry_t *de)
+{
+	errno_t rc;
 	void *data;
 	fat_instance_t *instance;
@@ -348,5 +348,5 @@
 }
 
-int fat_directory_create_sfn(fat_directory_t *di, fat_dentry_t *de,
+errno_t fat_directory_create_sfn(fat_directory_t *di, fat_dentry_t *de,
     const char *lname)
 {
@@ -398,8 +398,8 @@
 }
 
-int fat_directory_write_dentry(fat_directory_t *di, fat_dentry_t *de)
+errno_t fat_directory_write_dentry(fat_directory_t *di, fat_dentry_t *de)
 {
 	fat_dentry_t *d;
-	int rc;
+	errno_t rc;
 
 	rc = fat_directory_get(di, &d);
@@ -412,7 +412,7 @@
 }
 
-int fat_directory_expand(fat_directory_t *di)
-{
-	int rc;
+errno_t fat_directory_expand(fat_directory_t *di)
+{
+	errno_t rc;
 	fat_cluster_t mcl, lcl;
 
@@ -444,10 +444,10 @@
 }
 
-int fat_directory_lookup_free(fat_directory_t *di, size_t count)
+errno_t fat_directory_lookup_free(fat_directory_t *di, size_t count)
 {
 	fat_dentry_t *d;
 	size_t found;
 	aoff64_t pos;
-	int rc;
+	errno_t rc;
 	
 	do {
@@ -485,5 +485,5 @@
 }
 
-int fat_directory_lookup_name(fat_directory_t *di, const char *name,
+errno_t fat_directory_lookup_name(fat_directory_t *di, const char *name,
     fat_dentry_t **de)
 {
@@ -506,5 +506,5 @@
 {
 	fat_dentry_t *d;
-	int rc;
+	errno_t rc;
 
 	fat_directory_seek(di, 0);
@@ -538,8 +538,8 @@
  * @return EOK on success, ENOENT if not found, EIO on I/O error
  */
-int fat_directory_vollabel_get(fat_directory_t *di, char *label)
+errno_t fat_directory_vollabel_get(fat_directory_t *di, char *label)
 {
 	fat_dentry_t *d;
-	int rc;
+	errno_t rc;
 
 	fat_directory_seek(di, 0);
Index: uspace/srv/fs/fat/fat_directory.h
===================================================================
--- uspace/srv/fs/fat/fat_directory.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat_directory.h	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -52,25 +52,25 @@
 
 
-extern int fat_directory_open(fat_node_t *, fat_directory_t *);
-extern int fat_directory_close(fat_directory_t *);
+extern errno_t fat_directory_open(fat_node_t *, fat_directory_t *);
+extern errno_t fat_directory_close(fat_directory_t *);
 
-extern int fat_directory_next(fat_directory_t *);
-extern int fat_directory_prev(fat_directory_t *);
-extern int fat_directory_seek(fat_directory_t *, aoff64_t);
-extern int fat_directory_get(fat_directory_t *, fat_dentry_t **);
+extern errno_t fat_directory_next(fat_directory_t *);
+extern errno_t fat_directory_prev(fat_directory_t *);
+extern errno_t fat_directory_seek(fat_directory_t *, aoff64_t);
+extern errno_t fat_directory_get(fat_directory_t *, fat_dentry_t **);
 
-extern int fat_directory_read(fat_directory_t *, char *, fat_dentry_t **);
-extern int fat_directory_write(fat_directory_t *, const char *, fat_dentry_t *);
-extern int fat_directory_erase(fat_directory_t *);
-extern int fat_directory_lookup_name(fat_directory_t *, const char *,
+extern errno_t fat_directory_read(fat_directory_t *, char *, fat_dentry_t **);
+extern errno_t fat_directory_write(fat_directory_t *, const char *, fat_dentry_t *);
+extern errno_t fat_directory_erase(fat_directory_t *);
+extern errno_t fat_directory_lookup_name(fat_directory_t *, const char *,
     fat_dentry_t **);
 extern bool fat_directory_is_sfn_exist(fat_directory_t *, fat_dentry_t *);
 
-extern int fat_directory_lookup_free(fat_directory_t *, size_t);
-extern int fat_directory_write_dentry(fat_directory_t *, fat_dentry_t *);
-extern int fat_directory_create_sfn(fat_directory_t *, fat_dentry_t *,
+extern errno_t fat_directory_lookup_free(fat_directory_t *, size_t);
+extern errno_t fat_directory_write_dentry(fat_directory_t *, fat_dentry_t *);
+extern errno_t fat_directory_create_sfn(fat_directory_t *, fat_dentry_t *,
     const char *);
-extern int fat_directory_expand(fat_directory_t *);
-extern int fat_directory_vollabel_get(fat_directory_t *, char *);
+extern errno_t fat_directory_expand(fat_directory_t *);
+extern errno_t fat_directory_vollabel_get(fat_directory_t *, char *);
 
 #endif
Index: uspace/srv/fs/fat/fat_fat.c
===================================================================
--- uspace/srv/fs/fat/fat_fat.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat_fat.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -73,5 +73,5 @@
  * @return		EOK on success or an error code.
  */
-int
+errno_t
 fat_cluster_walk(fat_bs_t *bs, service_id_t service_id, fat_cluster_t firstc,
     fat_cluster_t *lastc, uint32_t *numc, uint32_t max_clusters)
@@ -80,5 +80,5 @@
 	fat_cluster_t clst = firstc, clst_last1 = FAT_CLST_LAST1(bs);
 	fat_cluster_t clst_bad = FAT_CLST_BAD(bs);
-	int rc;
+	errno_t rc;
 
 	if (firstc == FAT_CLST_RES0) {
@@ -123,5 +123,5 @@
  * @return		EOK on success or an error code.
  */
-int
+errno_t
 fat_block_get(block_t **block, struct fat_bs *bs, fat_node_t *nodep,
     aoff64_t bn, int flags)
@@ -130,5 +130,5 @@
 	fat_cluster_t currc = 0;
 	aoff64_t relbn = bn;
-	int rc;
+	errno_t rc;
 
 	if (!nodep->size)
@@ -188,5 +188,5 @@
  * @return		EOK on success or an error code.
  */
-int
+errno_t
 _fat_block_get(block_t **block, fat_bs_t *bs, service_id_t service_id,
     fat_cluster_t fcl, fat_cluster_t *clp, aoff64_t bn, int flags)
@@ -195,5 +195,5 @@
 	uint32_t max_clusters;
 	fat_cluster_t c = 0;
-	int rc;
+	errno_t rc;
 
 	/*
@@ -237,10 +237,10 @@
  * @return		EOK on success or an error code.
  */
-int
+errno_t
 fat_fill_gap(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl, aoff64_t pos)
 {
 	block_t *b;
 	aoff64_t o, boundary;
-	int rc;
+	errno_t rc;
 
 	boundary = ROUND_UP(nodep->size, BPS(bs) * SPC(bs));
@@ -289,5 +289,5 @@
  * @return		EOK or an error code.
  */
-static int
+static errno_t
 fat_get_cluster_fat12(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t *value)
@@ -296,5 +296,5 @@
 	uint16_t byte1, byte2;
 	aoff64_t offset;
-	int rc;
+	errno_t rc;
 
 	offset = (clst + clst / 2);
@@ -359,5 +359,5 @@
  * @return		EOK or an error code.
  */
-static int
+static errno_t
 fat_get_cluster_fat16(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t *value)
@@ -365,5 +365,5 @@
 	block_t *b;
 	aoff64_t offset;
-	int rc;
+	errno_t rc;
 
 	offset = (clst * FAT16_CLST_SIZE);
@@ -390,5 +390,5 @@
  * @return		EOK or an error code.
  */
-static int
+static errno_t
 fat_get_cluster_fat32(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t *value)
@@ -396,5 +396,5 @@
 	block_t *b;
 	aoff64_t offset;
-	int rc;
+	errno_t rc;
 
 	offset = (clst * FAT32_CLST_SIZE);
@@ -423,9 +423,9 @@
  * @return		EOK or an error code.
  */
-int
+errno_t
 fat_get_cluster(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t *value)
 {
-	int rc;
+	errno_t rc;
 
 	assert(fatno < FATCNT(bs));
@@ -451,5 +451,5 @@
  * @return		EOK on success or an error code.
  */
-static int
+static errno_t
 fat_set_cluster_fat12(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t value)
@@ -458,5 +458,5 @@
 	aoff64_t offset;
 	uint16_t byte1, byte2;
-	int rc;
+	errno_t rc;
 
 	offset = (clst + clst / 2);
@@ -539,5 +539,5 @@
  * @return		EOK on success or an error code.
  */
-static int
+static errno_t
 fat_set_cluster_fat16(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t value)
@@ -545,5 +545,5 @@
 	block_t *b;
 	aoff64_t offset;
-	int rc;
+	errno_t rc;
 
 	offset = (clst * FAT16_CLST_SIZE);
@@ -572,5 +572,5 @@
  * @return		EOK on success or an error code.
  */
-static int
+static errno_t
 fat_set_cluster_fat32(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t value)
@@ -578,5 +578,5 @@
 	block_t *b;
 	aoff64_t offset;
-	int rc;
+	errno_t rc;
 	fat_cluster_t temp;
 
@@ -609,9 +609,9 @@
  * @return		EOK on success or an error code.
  */
-int
+errno_t
 fat_set_cluster(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
     fat_cluster_t clst, fat_cluster_t value)
 {
-	int rc;
+	errno_t rc;
 
 	assert(fatno < FATCNT(bs));
@@ -636,5 +636,5 @@
  * @return		EOK on success or an error code.
  */
-int fat_alloc_shadow_clusters(fat_bs_t *bs, service_id_t service_id,
+errno_t fat_alloc_shadow_clusters(fat_bs_t *bs, service_id_t service_id,
     fat_cluster_t *lifo, unsigned nclsts)
 {
@@ -642,5 +642,5 @@
 	unsigned c;
 	fat_cluster_t clst_last1 = FAT_CLST_LAST1(bs);
-	int rc;
+	errno_t rc;
 
 	for (fatno = FAT1 + 1; fatno < FATCNT(bs); fatno++) {
@@ -673,5 +673,5 @@
  * @return		EOK on success, an error code otherwise.
  */
-int
+errno_t
 fat_alloc_clusters(fat_bs_t *bs, service_id_t service_id, unsigned nclsts,
     fat_cluster_t *mcl, fat_cluster_t *lcl)
@@ -682,5 +682,5 @@
 	fat_cluster_t value = 0;
 	fat_cluster_t clst_last1 = FAT_CLST_LAST1(bs);
-	int rc = EOK;
+	errno_t rc = EOK;
 
 	lifo = (fat_cluster_t *) malloc(nclsts * sizeof(fat_cluster_t));
@@ -744,5 +744,5 @@
  * @return		EOK on success or an error code.
  */
-int
+errno_t
 fat_free_clusters(fat_bs_t *bs, service_id_t service_id, fat_cluster_t firstc)
 {
@@ -750,5 +750,5 @@
 	fat_cluster_t nextc = 0;
 	fat_cluster_t clst_bad = FAT_CLST_BAD(bs);
-	int rc;
+	errno_t rc;
 
 	/* Mark all clusters in the chain as free in all copies of FAT. */
@@ -782,5 +782,5 @@
  * @return		EOK on success or an error code.
  */
-int fat_append_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl,
+errno_t fat_append_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl,
     fat_cluster_t lcl)
 {
@@ -788,5 +788,5 @@
 	fat_cluster_t lastc = 0;
 	uint8_t fatno;
-	int rc;
+	errno_t rc;
 
 	if (nodep->firstc == FAT_CLST_RES0) {
@@ -829,8 +829,8 @@
  * @return		EOK on success or an error code.
  */
-int fat_chop_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t lcl)
+errno_t fat_chop_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t lcl)
 {
 	fat_cluster_t clst_last1 = FAT_CLST_LAST1(bs);
-	int rc;
+	errno_t rc;
 	service_id_t service_id = nodep->idx->service_id;
 
@@ -880,10 +880,10 @@
 }
 
-int
+errno_t
 fat_zero_cluster(struct fat_bs *bs, service_id_t service_id, fat_cluster_t c)
 {
 	int i;
 	block_t *b;
-	int rc;
+	errno_t rc;
 
 	for (i = 0; i < SPC(bs); i++) {
@@ -908,10 +908,10 @@
  * does not contain a fat file system.
  */
-int fat_sanity_check(fat_bs_t *bs, service_id_t service_id)
+errno_t fat_sanity_check(fat_bs_t *bs, service_id_t service_id)
 {
 	fat_cluster_t e0 = 0;
 	fat_cluster_t e1 = 0;
 	unsigned fat_no;
-	int rc;
+	errno_t rc;
 
 	/* Check number of FATs. */
Index: uspace/srv/fs/fat/fat_fat.h
===================================================================
--- uspace/srv/fs/fat/fat_fat.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat_fat.h	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -108,29 +108,29 @@
 #define fat_clusters_get(numc, bs, sid, fc) \
     fat_cluster_walk((bs), (sid), (fc), NULL, (numc), (uint32_t) -1)
-extern int fat_cluster_walk(struct fat_bs *, service_id_t, fat_cluster_t,
+extern errno_t fat_cluster_walk(struct fat_bs *, service_id_t, fat_cluster_t,
     fat_cluster_t *, uint32_t *, uint32_t);
 
-extern int fat_block_get(block_t **, struct fat_bs *, struct fat_node *,
+extern errno_t fat_block_get(block_t **, struct fat_bs *, struct fat_node *,
     aoff64_t, int);
-extern int _fat_block_get(block_t **, struct fat_bs *, service_id_t,
+extern errno_t _fat_block_get(block_t **, struct fat_bs *, service_id_t,
     fat_cluster_t, fat_cluster_t *, aoff64_t, int);
 
-extern int fat_append_clusters(struct fat_bs *, struct fat_node *,
+extern errno_t fat_append_clusters(struct fat_bs *, struct fat_node *,
     fat_cluster_t, fat_cluster_t);
-extern int fat_chop_clusters(struct fat_bs *, struct fat_node *,
+extern errno_t fat_chop_clusters(struct fat_bs *, struct fat_node *,
     fat_cluster_t);
-extern int fat_alloc_clusters(struct fat_bs *, service_id_t, unsigned,
+extern errno_t fat_alloc_clusters(struct fat_bs *, service_id_t, unsigned,
     fat_cluster_t *, fat_cluster_t *);
-extern int fat_free_clusters(struct fat_bs *, service_id_t, fat_cluster_t);
-extern int fat_alloc_shadow_clusters(struct fat_bs *, service_id_t,
+extern errno_t fat_free_clusters(struct fat_bs *, service_id_t, fat_cluster_t);
+extern errno_t fat_alloc_shadow_clusters(struct fat_bs *, service_id_t,
     fat_cluster_t *, unsigned);
-extern int fat_get_cluster(struct fat_bs *, service_id_t, unsigned,
+extern errno_t fat_get_cluster(struct fat_bs *, service_id_t, unsigned,
     fat_cluster_t, fat_cluster_t *);
-extern int fat_set_cluster(struct fat_bs *, service_id_t, unsigned,
+extern errno_t fat_set_cluster(struct fat_bs *, service_id_t, unsigned,
     fat_cluster_t, fat_cluster_t);
-extern int fat_fill_gap(struct fat_bs *, struct fat_node *, fat_cluster_t,
+extern errno_t fat_fill_gap(struct fat_bs *, struct fat_node *, fat_cluster_t,
     aoff64_t);
-extern int fat_zero_cluster(struct fat_bs *, service_id_t, fat_cluster_t);
-extern int fat_sanity_check(struct fat_bs *, service_id_t);
+extern errno_t fat_zero_cluster(struct fat_bs *, service_id_t, fat_cluster_t);
+extern errno_t fat_sanity_check(struct fat_bs *, service_id_t);
 
 #endif
Index: uspace/srv/fs/fat/fat_idx.c
===================================================================
--- uspace/srv/fs/fat/fat_idx.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat_idx.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -328,5 +328,5 @@
 }
 
-static int fat_idx_create(fat_idx_t **fidxp, service_id_t service_id)
+static errno_t fat_idx_create(fat_idx_t **fidxp, service_id_t service_id)
 {
 	fat_idx_t *fidx;
@@ -350,8 +350,8 @@
 }
 
-int fat_idx_get_new(fat_idx_t **fidxp, service_id_t service_id)
+errno_t fat_idx_get_new(fat_idx_t **fidxp, service_id_t service_id)
 {
 	fat_idx_t *fidx;
-	int rc;
+	errno_t rc;
 
 	fibril_mutex_lock(&used_lock);
@@ -386,5 +386,5 @@
 		fidx = hash_table_get_inst(l, fat_idx_t, uph_link);
 	} else {
-		int rc;
+		errno_t rc;
 
 		rc = fat_idx_create(&fidx, service_id);
@@ -467,5 +467,5 @@
 }
 
-int fat_idx_init(void)
+errno_t fat_idx_init(void)
 {
 	if (!hash_table_create(&up_hash, 0, 0, &uph_ops)) 
@@ -486,8 +486,8 @@
 }
 
-int fat_idx_init_by_service_id(service_id_t service_id)
+errno_t fat_idx_init_by_service_id(service_id_t service_id)
 {
 	unused_t *u;
-	int rc = EOK;
+	errno_t rc = EOK;
 
 	u = (unused_t *) malloc(sizeof(unused_t));
Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/srv/fs/fat/fat_ops.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -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;
