Index: uspace/drv/block/ddisk/ddisk.c
===================================================================
--- uspace/drv/block/ddisk/ddisk.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/block/ddisk/ddisk.c	(revision 46577995860f76c247274a43eb6f67b944f0d3a8)
@@ -56,9 +56,9 @@
 #define DDISK_CMD_IRQ_DEASSERT	0x4
 
-static int ddisk_dev_add(ddf_dev_t *);
-static int ddisk_dev_remove(ddf_dev_t *);
-static int ddisk_dev_gone(ddf_dev_t *);
-static int ddisk_fun_online(ddf_fun_t *);
-static int ddisk_fun_offline(ddf_fun_t *);
+static errno_t ddisk_dev_add(ddf_dev_t *);
+static errno_t ddisk_dev_remove(ddf_dev_t *);
+static errno_t ddisk_dev_gone(ddf_dev_t *);
+static errno_t ddisk_fun_online(ddf_fun_t *);
+static errno_t ddisk_fun_offline(ddf_fun_t *);
 
 static void ddisk_bd_connection(ipc_callid_t, ipc_call_t *, void *);
@@ -117,11 +117,11 @@
 } ddisk_t;
 
-static int ddisk_bd_open(bd_srvs_t *, bd_srv_t *);
-static int ddisk_bd_close(bd_srv_t *);
-static int ddisk_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
-static int ddisk_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *,
+static errno_t ddisk_bd_open(bd_srvs_t *, bd_srv_t *);
+static errno_t ddisk_bd_close(bd_srv_t *);
+static errno_t ddisk_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
+static errno_t ddisk_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *,
     size_t);
-static int ddisk_bd_get_block_size(bd_srv_t *, size_t *);
-static int ddisk_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
+static errno_t ddisk_bd_get_block_size(bd_srv_t *, size_t *);
+static errno_t ddisk_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
 
 bd_ops_t ddisk_bd_ops = {
@@ -188,10 +188,10 @@
 }
 
-int ddisk_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
-{
-	return EOK;
-}
-
-int ddisk_bd_close(bd_srv_t *bd)
+errno_t ddisk_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
+{
+	return EOK;
+}
+
+errno_t ddisk_bd_close(bd_srv_t *bd)
 {
 	return EOK;
@@ -199,5 +199,5 @@
 
 static
-int ddisk_rw_block(ddisk_t *ddisk, bool read, aoff64_t ba, void *buf)
+errno_t ddisk_rw_block(ddisk_t *ddisk, bool read, aoff64_t ba, void *buf)
 {
 	fibril_mutex_lock(&ddisk->lock);
@@ -236,10 +236,10 @@
 
 static
-int ddisk_bd_rw_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
+errno_t ddisk_bd_rw_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     size_t size, bool is_read)
 {
 	ddisk_t *ddisk = (ddisk_t *) bd->srvs->sarg;
 	aoff64_t i;
-	int rc;
+	errno_t rc;
 
 	if (size < cnt * DDISK_BLOCK_SIZE)
@@ -256,5 +256,5 @@
 }
 
-int ddisk_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
+errno_t ddisk_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     size_t size)
 {
@@ -262,5 +262,5 @@
 }
 
-int ddisk_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
+errno_t ddisk_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
     const void *buf, size_t size)
 {
@@ -268,5 +268,5 @@
 }
 
-int ddisk_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
+errno_t ddisk_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
 {
 	*rsize = DDISK_BLOCK_SIZE; 
@@ -274,5 +274,5 @@
 }
 
-int ddisk_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
+errno_t ddisk_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
 {
 	ddisk_t *ddisk = (ddisk_t *) bd->srvs->sarg;
@@ -282,9 +282,9 @@
 }
 
-static int ddisk_get_res(ddf_dev_t *dev, ddisk_res_t *ddisk_res)
+static errno_t ddisk_get_res(ddf_dev_t *dev, ddisk_res_t *ddisk_res)
 {
 	async_sess_t *parent_sess;
 	hw_res_list_parsed_t hw_res;
-	int rc;
+	errno_t rc;
 
 	parent_sess = ddf_dev_parent_sess_get(dev);
@@ -317,7 +317,7 @@
 }
 
-static int ddisk_fun_create(ddisk_t *ddisk)
-{
-	int rc;
+static errno_t ddisk_fun_create(ddisk_t *ddisk)
+{
+	errno_t rc;
 	ddf_fun_t *fun = NULL;
 
@@ -350,7 +350,7 @@
 }
 
-static int ddisk_fun_remove(ddisk_t *ddisk)
-{
-	int rc;
+static errno_t ddisk_fun_remove(ddisk_t *ddisk)
+{
+	errno_t rc;
 
 	if (ddisk->fun == NULL)
@@ -381,7 +381,7 @@
 }
 
-static int ddisk_fun_unbind(ddisk_t *ddisk)
-{
-	int rc;
+static errno_t ddisk_fun_unbind(ddisk_t *ddisk)
+{
+	errno_t rc;
 
 	if (ddisk->fun == NULL)
@@ -410,9 +410,9 @@
  * @return     EOK on success or an error code.
  */
-static int ddisk_dev_add(ddf_dev_t *dev)
+static errno_t ddisk_dev_add(ddf_dev_t *dev)
 {
 	ddisk_t *ddisk;
 	ddisk_res_t res;
-	int rc;
+	errno_t rc;
 
 	/*
@@ -530,7 +530,7 @@
 
 
-static int ddisk_dev_remove_common(ddisk_t *ddisk, bool surprise)
-{
-	int rc;
+static errno_t ddisk_dev_remove_common(ddisk_t *ddisk, bool surprise)
+{
+	errno_t rc;
 
 	if (!surprise)
@@ -558,5 +558,5 @@
 }
 
-static int ddisk_dev_remove(ddf_dev_t *dev)
+static errno_t ddisk_dev_remove(ddf_dev_t *dev)
 {
 	ddisk_t *ddisk = (ddisk_t *) ddf_dev_data_get(dev);
@@ -566,5 +566,5 @@
 }
 
-static int ddisk_dev_gone(ddf_dev_t *dev)
+static errno_t ddisk_dev_gone(ddf_dev_t *dev)
 {
 	ddisk_t *ddisk = (ddisk_t *) ddf_dev_data_get(dev);
@@ -574,5 +574,5 @@
 }
 
-static int ddisk_fun_online(ddf_fun_t *fun)
+static errno_t ddisk_fun_online(ddf_fun_t *fun)
 {
 	ddf_msg(LVL_DEBUG, "ddisk_fun_online()");
@@ -580,5 +580,5 @@
 }
 
-static int ddisk_fun_offline(ddf_fun_t *fun)
+static errno_t ddisk_fun_offline(ddf_fun_t *fun)
 {
 	ddf_msg(LVL_DEBUG, "ddisk_fun_offline()");
