Index: uspace/drv/block/usbmast/main.c
===================================================================
--- uspace/drv/block/usbmast/main.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/drv/block/usbmast/main.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -77,15 +77,15 @@
 };
 
-static int usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun);
+static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun);
 static void usbmast_bd_connection(ipc_callid_t iid, ipc_call_t *icall,
     void *arg);
 
-static int usbmast_bd_open(bd_srvs_t *, bd_srv_t *);
-static int usbmast_bd_close(bd_srv_t *);
-static int usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
-static int usbmast_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
-static int usbmast_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
-static int usbmast_bd_get_block_size(bd_srv_t *, size_t *);
-static int usbmast_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
+static errno_t usbmast_bd_open(bd_srvs_t *, bd_srv_t *);
+static errno_t usbmast_bd_close(bd_srv_t *);
+static errno_t usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
+static errno_t usbmast_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
+static errno_t usbmast_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
+static errno_t usbmast_bd_get_block_size(bd_srv_t *, size_t *);
+static errno_t usbmast_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
 
 static bd_ops_t usbmast_bd_ops = {
@@ -109,5 +109,5 @@
  * @return Error code.
  */
-static int usbmast_device_gone(usb_device_t *dev)
+static errno_t usbmast_device_gone(usb_device_t *dev)
 {
 	usbmast_dev_t *mdev = usb_device_data_get(dev);
@@ -115,5 +115,5 @@
 
 	for (size_t i = 0; i < mdev->lun_count; ++i) {
-		const int rc = ddf_fun_unbind(mdev->luns[i]);
+		const errno_t rc = ddf_fun_unbind(mdev->luns[i]);
 		if (rc != EOK) {
 			usb_log_error("Failed to unbind LUN function %zu: "
@@ -133,5 +133,5 @@
  * @return Error code.
  */
-static int usbmast_device_remove(usb_device_t *dev)
+static errno_t usbmast_device_remove(usb_device_t *dev)
 {
 	//TODO: flush buffers, or whatever.
@@ -145,7 +145,7 @@
  * @return Error code.
  */
-static int usbmast_device_add(usb_device_t *dev)
-{
-	int rc;
+static errno_t usbmast_device_add(usb_device_t *dev)
+{
+	errno_t rc;
 	usbmast_dev_t *mdev = NULL;
 	unsigned i;
@@ -199,5 +199,5 @@
 		if (mdev->luns[i] == NULL)
 			continue;
-		const int rc = ddf_fun_unbind(mdev->luns[i]);
+		const errno_t rc = ddf_fun_unbind(mdev->luns[i]);
 		if (rc != EOK) {
 			usb_log_warning("Failed to unbind LUN function %zu: "
@@ -218,7 +218,7 @@
  * @return		EOK on success or an error code.
  */
-static int usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun)
-{
-	int rc;
+static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun)
+{
+	errno_t rc;
 	char *fun_name = NULL;
 	ddf_fun_t *fun = NULL;
@@ -327,5 +327,5 @@
 
 /** Open device. */
-static int usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
+static errno_t usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
 {
 	return EOK;
@@ -333,5 +333,5 @@
 
 /** Close device. */
-static int usbmast_bd_close(bd_srv_t *bd)
+static errno_t usbmast_bd_close(bd_srv_t *bd)
 {
 	return EOK;
@@ -339,5 +339,5 @@
 
 /** Read blocks from the device. */
-static int usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf,
+static errno_t usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf,
     size_t size)
 {
@@ -351,5 +351,5 @@
 
 /** Synchronize blocks to nonvolatile storage. */
-static int usbmast_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt)
+static errno_t usbmast_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt)
 {
 	usbmast_fun_t *mfun = bd_srv_usbmast(bd);
@@ -359,5 +359,5 @@
 
 /** Write blocks to the device. */
-static int usbmast_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,
+static errno_t usbmast_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,
     const void *buf, size_t size)
 {
@@ -371,5 +371,5 @@
 
 /** Get device block size. */
-static int usbmast_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
+static errno_t usbmast_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
 {
 	usbmast_fun_t *mfun = bd_srv_usbmast(bd);
@@ -379,5 +379,5 @@
 
 /** Get number of blocks on device. */
-static int usbmast_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
+static errno_t usbmast_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
 {
 	usbmast_fun_t *mfun = bd_srv_usbmast(bd);
