Index: uspace/lib/block/block.c
===================================================================
--- uspace/lib/block/block.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/block/block.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -88,6 +88,6 @@
 } devcon_t;
 
-static int read_blocks(devcon_t *, aoff64_t, size_t, void *, size_t);
-static int write_blocks(devcon_t *, aoff64_t, size_t, void *, size_t);
+static errno_t read_blocks(devcon_t *, aoff64_t, size_t, void *, size_t);
+static errno_t write_blocks(devcon_t *, aoff64_t, size_t, void *, size_t);
 static aoff64_t ba_ltop(devcon_t *, aoff64_t);
 
@@ -107,5 +107,5 @@
 }
 
-static int devcon_add(service_id_t service_id, async_sess_t *sess,
+static errno_t devcon_add(service_id_t service_id, async_sess_t *sess,
     size_t bsize, aoff64_t dev_size, bd_t *bd)
 {
@@ -146,5 +146,5 @@
 }
 
-int block_init(service_id_t service_id, size_t comm_size)
+errno_t block_init(service_id_t service_id, size_t comm_size)
 {
 	bd_t *bd;
@@ -156,5 +156,5 @@
 	}
 	
-	int rc = bd_open(sess, &bd);
+	errno_t rc = bd_open(sess, &bd);
 	if (rc != EOK) {
 		async_hangup(sess);
@@ -209,8 +209,8 @@
 }
 
-int block_bb_read(service_id_t service_id, aoff64_t ba)
+errno_t block_bb_read(service_id_t service_id, aoff64_t ba)
 {
 	void *bb_buf;
-	int rc;
+	errno_t rc;
 
 	devcon_t *devcon = devcon_search(service_id);
@@ -270,5 +270,5 @@
 };
 
-int block_cache_init(service_id_t service_id, size_t size, unsigned blocks,
+errno_t block_cache_init(service_id_t service_id, size_t size, unsigned blocks,
     enum cache_mode mode)
 {
@@ -307,9 +307,9 @@
 }
 
-int block_cache_fini(service_id_t service_id)
+errno_t block_cache_fini(service_id_t service_id)
 {
 	devcon_t *devcon = devcon_search(service_id);
 	cache_t *cache;
-	int rc;
+	errno_t rc;
 
 	if (!devcon)
@@ -383,5 +383,5 @@
  * @return			EOK on success or an error code.
  */
-int block_get(block_t **block, service_id_t service_id, aoff64_t ba, int flags)
+errno_t block_get(block_t **block, service_id_t service_id, aoff64_t ba, int flags)
 {
 	devcon_t *devcon;
@@ -390,5 +390,5 @@
 	link_t *link;
 	aoff64_t p_ba;
-	int rc;
+	errno_t rc;
 	
 	devcon = devcon_search(service_id);
@@ -580,5 +580,5 @@
  * @return		EOK on success or an error code.
  */
-int block_put(block_t *block)
+errno_t block_put(block_t *block)
 {
 	devcon_t *devcon = devcon_search(block->service_id);
@@ -586,5 +586,5 @@
 	unsigned blocks_cached;
 	enum cache_mode mode;
-	int rc = EOK;
+	errno_t rc = EOK;
 
 	assert(devcon);
@@ -701,5 +701,5 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_seqread(service_id_t service_id, void *buf, size_t *bufpos,
+errno_t block_seqread(service_id_t service_id, void *buf, size_t *bufpos,
     size_t *buflen, aoff64_t *pos, void *dst, size_t size)
 {
@@ -735,5 +735,5 @@
 		if (*bufpos == *buflen) {
 			/* Refill the communication buffer with a new block. */
-			int rc;
+			errno_t rc;
 
 			rc = read_blocks(devcon, *pos / block_size, 1, buf,
@@ -760,5 +760,5 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_read_direct(service_id_t service_id, aoff64_t ba, size_t cnt, void *buf)
+errno_t block_read_direct(service_id_t service_id, aoff64_t ba, size_t cnt, void *buf)
 {
 	devcon_t *devcon;
@@ -779,5 +779,5 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_write_direct(service_id_t service_id, aoff64_t ba, size_t cnt,
+errno_t block_write_direct(service_id_t service_id, aoff64_t ba, size_t cnt,
     const void *data)
 {
@@ -798,5 +798,5 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_sync_cache(service_id_t service_id, aoff64_t ba, size_t cnt)
+errno_t block_sync_cache(service_id_t service_id, aoff64_t ba, size_t cnt)
 {
 	devcon_t *devcon;
@@ -815,5 +815,5 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_get_bsize(service_id_t service_id, size_t *bsize)
+errno_t block_get_bsize(service_id_t service_id, size_t *bsize)
 {
 	devcon_t *devcon;
@@ -832,5 +832,5 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_get_nblocks(service_id_t service_id, aoff64_t *nblocks)
+errno_t block_get_nblocks(service_id_t service_id, aoff64_t *nblocks)
 {
 	devcon_t *devcon = devcon_search(service_id);
@@ -849,8 +849,8 @@
  * @return		EOK on success or an error code on failure.
  */
-int block_read_bytes_direct(service_id_t service_id, aoff64_t abs_offset,
+errno_t block_read_bytes_direct(service_id_t service_id, aoff64_t abs_offset,
     size_t bytes, void *data)
 {
-	int rc;
+	errno_t rc;
 	size_t phys_block_size;
 	size_t buf_size;
@@ -901,5 +901,5 @@
  *
  */
-int block_read_toc(service_id_t service_id, uint8_t session, void *buf,
+errno_t block_read_toc(service_id_t service_id, uint8_t session, void *buf,
     size_t bufsize)
 {
@@ -919,10 +919,10 @@
  * @return		EOK on success or an error code on failure.
  */
-static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt, void *buf,
+static errno_t read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt, void *buf,
     size_t size)
 {
 	assert(devcon);
 	
-	int rc = bd_read_blocks(devcon->bd, ba, cnt, buf, size);
+	errno_t rc = bd_read_blocks(devcon->bd, ba, cnt, buf, size);
 	if (rc != EOK) {
 		printf("Error %s reading %zu blocks starting at block %" PRIuOFF64
@@ -946,10 +946,10 @@
  * @return		EOK on success or an error code on failure.
  */
-static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt, void *data,
+static errno_t write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt, void *data,
     size_t size)
 {
 	assert(devcon);
 	
-	int rc = bd_write_blocks(devcon->bd, ba, cnt, data, size);
+	errno_t rc = bd_write_blocks(devcon->bd, ba, cnt, data, size);
 	if (rc != EOK) {
 		printf("Error %s writing %zu blocks starting at block %" PRIuOFF64
