Index: uspace/lib/usbvirt/src/ctrltransfer.c
===================================================================
--- uspace/lib/usbvirt/src/ctrltransfer.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/ctrltransfer.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -49,5 +49,5 @@
  * @retval EFORWARD No suitable handler found.
  */
-int process_control_transfer(usbvirt_device_t *dev,
+errno_t process_control_transfer(usbvirt_device_t *dev,
     const usbvirt_control_request_handler_t *control_handlers,
     const usb_device_request_setup_packet_t *setup,
@@ -70,5 +70,5 @@
 		usb_log_debug("Control transfer: %s(%s)\n", handler->name,
 		    usb_debug_str_buffer((uint8_t*) setup, sizeof(*setup), 0));
-		int rc = handler->callback(dev, setup, data, data_sent_size);
+		errno_t rc = handler->callback(dev, setup, data, data_sent_size);
 		if (rc != EFORWARD) {
 			return rc;
Index: uspace/lib/usbvirt/src/device.c
===================================================================
--- uspace/lib/usbvirt/src/device.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/device.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -82,5 +82,5 @@
  * @return Error code.
  */
-int usbvirt_device_plug(usbvirt_device_t *dev, const char *vhc_path)
+errno_t usbvirt_device_plug(usbvirt_device_t *dev, const char *vhc_path)
 {
 	if (DEV != NULL)
@@ -88,5 +88,5 @@
 	
 	devman_handle_t handle;
-	int rc = devman_fun_get_handle(vhc_path, &handle, 0);
+	errno_t rc = devman_fun_get_handle(vhc_path, &handle, 0);
 	if (rc != EOK)
 		return rc;
Index: uspace/lib/usbvirt/src/ipc_dev.c
===================================================================
--- uspace/lib/usbvirt/src/ipc_dev.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/ipc_dev.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -81,5 +81,5 @@
     ipc_callid_t iid, ipc_call_t *icall)
 {
-	int rc;
+	errno_t rc;
 
 	void *setup_packet = NULL;
@@ -137,5 +137,5 @@
 {
 	size_t data_buffer_len = IPC_GET_ARG1(*icall);
-	int rc;
+	errno_t rc;
 
 	void *setup_packet = NULL;
@@ -183,5 +183,5 @@
 	usb_endpoint_t endpoint = IPC_GET_ARG1(*icall);
 
-	int rc;
+	errno_t rc;
 
 	size_t data_len = 0;
@@ -230,5 +230,5 @@
 	size_t data_buffer_size = 0;
 
-	int rc = async_data_write_accept(&data_buffer, false,
+	errno_t rc = async_data_write_accept(&data_buffer, false,
 	    1, 0, 0, &data_buffer_size);
 	if (rc != EOK) {
Index: uspace/lib/usbvirt/src/ipc_hc.c
===================================================================
--- uspace/lib/usbvirt/src/ipc_hc.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/ipc_hc.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -55,5 +55,5 @@
  *
  */
-int usbvirt_ipc_send_control_read(async_sess_t *sess, void *setup_buffer,
+errno_t usbvirt_ipc_send_control_read(async_sess_t *sess, void *setup_buffer,
     size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size,
     size_t *data_transfered_size)
@@ -77,5 +77,5 @@
 	}
 	
-	int rc = async_data_write_start(exch, setup_buffer, setup_buffer_size);
+	errno_t rc = async_data_write_start(exch, setup_buffer, setup_buffer_size);
 	if (rc != EOK) {
 		async_exchange_end(exch);
@@ -95,6 +95,6 @@
 	}
 	
-	int data_request_rc;
-	int opening_request_rc;
+	errno_t data_request_rc;
+	errno_t opening_request_rc;
 	async_wait_for(data_request, &data_request_rc);
 	async_wait_for(opening_request, &opening_request_rc);
@@ -103,11 +103,11 @@
 		/* Prefer the return code of the opening request. */
 		if (opening_request_rc != EOK)
-			return (int) opening_request_rc;
+			return (errno_t) opening_request_rc;
 		else
-			return (int) data_request_rc;
+			return (errno_t) data_request_rc;
 	}
 	
 	if (opening_request_rc != EOK)
-		return (int) opening_request_rc;
+		return (errno_t) opening_request_rc;
 	
 	if (data_transfered_size != NULL)
@@ -129,5 +129,5 @@
  *
  */
-int usbvirt_ipc_send_control_write(async_sess_t *sess, void *setup_buffer,
+errno_t usbvirt_ipc_send_control_write(async_sess_t *sess, void *setup_buffer,
     size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size)
 {
@@ -150,5 +150,5 @@
 	}
 	
-	int rc = async_data_write_start(exch, setup_buffer, setup_buffer_size);
+	errno_t rc = async_data_write_start(exch, setup_buffer, setup_buffer_size);
 	if (rc != EOK) {
 		async_exchange_end(exch);
@@ -168,8 +168,8 @@
 	async_exchange_end(exch);
 	
-	int opening_request_rc;
+	errno_t opening_request_rc;
 	async_wait_for(opening_request, &opening_request_rc);
 	
-	return (int) opening_request_rc;
+	return (errno_t) opening_request_rc;
 }
 
@@ -186,5 +186,5 @@
  *
  */
-int usbvirt_ipc_send_data_in(async_sess_t *sess, usb_endpoint_t ep,
+errno_t usbvirt_ipc_send_data_in(async_sess_t *sess, usb_endpoint_t ep,
     usb_transfer_type_t tr_type, void *data, size_t data_size, size_t *act_size)
 {
@@ -230,6 +230,6 @@
 	}
 	
-	int data_request_rc;
-	int opening_request_rc;
+	errno_t data_request_rc;
+	errno_t opening_request_rc;
 	async_wait_for(data_request, &data_request_rc);
 	async_wait_for(opening_request, &opening_request_rc);
@@ -238,11 +238,11 @@
 		/* Prefer the return code of the opening request. */
 		if (opening_request_rc != EOK)
-			return (int) opening_request_rc;
+			return (errno_t) opening_request_rc;
 		else
-			return (int) data_request_rc;
+			return (errno_t) data_request_rc;
 	}
 	
 	if (opening_request_rc != EOK)
-		return (int) opening_request_rc;
+		return (errno_t) opening_request_rc;
 	
 	if (act_size != NULL)
@@ -263,5 +263,5 @@
  *
  */
-int usbvirt_ipc_send_data_out(async_sess_t *sess, usb_endpoint_t ep,
+errno_t usbvirt_ipc_send_data_out(async_sess_t *sess, usb_endpoint_t ep,
     usb_transfer_type_t tr_type, void *data, size_t data_size)
 {
@@ -296,5 +296,5 @@
 	}
 	
-	int rc = async_data_write_start(exch, data, data_size);
+	errno_t rc = async_data_write_start(exch, data, data_size);
 	
 	async_exchange_end(exch);
@@ -305,8 +305,8 @@
 	}
 	
-	int opening_request_rc;
+	errno_t opening_request_rc;
 	async_wait_for(opening_request, &opening_request_rc);
 	
-	return (int) opening_request_rc;
+	return (errno_t) opening_request_rc;
 }
 
Index: uspace/lib/usbvirt/src/private.h
===================================================================
--- uspace/lib/usbvirt/src/private.h	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/private.h	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -38,5 +38,5 @@
 #include <usbvirt/device.h>
 
-int process_control_transfer(usbvirt_device_t *,
+errno_t process_control_transfer(usbvirt_device_t *,
     const usbvirt_control_request_handler_t *,
     const usb_device_request_setup_packet_t *,
Index: uspace/lib/usbvirt/src/stdreq.c
===================================================================
--- uspace/lib/usbvirt/src/stdreq.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/stdreq.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -66,5 +66,5 @@
 
 /** NOP handler */
-int req_nop(usbvirt_device_t *device,
+errno_t req_nop(usbvirt_device_t *device,
     const usb_device_request_setup_packet_t *setup_packet,
     uint8_t *data, size_t *act_size)
@@ -74,5 +74,5 @@
 
 /** GET_DESCRIPTOR handler. */
-static int req_get_descriptor(usbvirt_device_t *device,
+static errno_t req_get_descriptor(usbvirt_device_t *device,
     const usb_device_request_setup_packet_t *setup_packet, uint8_t *data, size_t *act_size)
 {
@@ -135,5 +135,5 @@
 }
 
-static int req_set_address(usbvirt_device_t *device,
+static errno_t req_set_address(usbvirt_device_t *device,
     const usb_device_request_setup_packet_t *setup_packet, uint8_t *data, size_t *act_size)
 {
@@ -155,5 +155,5 @@
 }
 
-static int req_set_configuration(usbvirt_device_t *device,
+static errno_t req_set_configuration(usbvirt_device_t *device,
     const usb_device_request_setup_packet_t *setup_packet, uint8_t *data, size_t *act_size)
 {
@@ -197,5 +197,5 @@
 }
 
-static int req_get_dev_status(usbvirt_device_t *device,
+static errno_t req_get_dev_status(usbvirt_device_t *device,
     const usb_device_request_setup_packet_t *setup_packet, uint8_t *data, size_t *act_size)
 {
@@ -207,5 +207,5 @@
 	return EOK;
 }
-static int req_get_iface_ep_status(usbvirt_device_t *device,
+static errno_t req_get_iface_ep_status(usbvirt_device_t *device,
     const usb_device_request_setup_packet_t *setup_packet, uint8_t *data, size_t *act_size)
 {
Index: uspace/lib/usbvirt/src/transfer.c
===================================================================
--- uspace/lib/usbvirt/src/transfer.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/transfer.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -50,5 +50,5 @@
  * @return Error code.
  */
-static int usbvirt_control_transfer(usbvirt_device_t *dev,
+static errno_t usbvirt_control_transfer(usbvirt_device_t *dev,
     const void *setup, size_t setup_size,
     void *data, size_t data_size, size_t *data_size_sent)
@@ -65,5 +65,5 @@
 	}
 
-	int rc;
+	errno_t rc;
 
 	/* Run user handler first. */
@@ -100,5 +100,5 @@
  * @return Error code.
  */
-int usbvirt_control_write(usbvirt_device_t *dev, const void *setup,
+errno_t usbvirt_control_write(usbvirt_device_t *dev, const void *setup,
     size_t setup_size, void *data, size_t data_size)
 {
@@ -119,5 +119,5 @@
  * @return Error code.
  */
-int usbvirt_control_read(usbvirt_device_t *dev, const void *setup, size_t setup_size,
+errno_t usbvirt_control_read(usbvirt_device_t *dev, const void *setup, size_t setup_size,
     void *data, size_t data_size, size_t *data_size_sent)
 {
@@ -135,5 +135,5 @@
  * @return Error code.
  */
-int usbvirt_data_out(usbvirt_device_t *dev, usb_transfer_type_t transf_type,
+errno_t usbvirt_data_out(usbvirt_device_t *dev, usb_transfer_type_t transf_type,
     usb_endpoint_t endpoint, const void *data, size_t data_size)
 {
@@ -145,5 +145,5 @@
 	}
 
-	int rc = dev->ops->data_out[endpoint](dev, endpoint, transf_type,
+	errno_t rc = dev->ops->data_out[endpoint](dev, endpoint, transf_type,
 	    data, data_size);
 
@@ -161,5 +161,5 @@
  * @return Error code.
  */
-int usbvirt_data_in(usbvirt_device_t *dev, usb_transfer_type_t transf_type,
+errno_t usbvirt_data_in(usbvirt_device_t *dev, usb_transfer_type_t transf_type,
     usb_endpoint_t endpoint, void *data, size_t data_size, size_t *data_size_sent)
 {
@@ -172,5 +172,5 @@
 
 	size_t data_size_sent_tmp;
-	int rc = dev->ops->data_in[endpoint](dev, endpoint, transf_type,
+	errno_t rc = dev->ops->data_in[endpoint](dev, endpoint, transf_type,
 	    data, data_size, &data_size_sent_tmp);
 
Index: uspace/lib/usbvirt/src/virthub_base.c
===================================================================
--- uspace/lib/usbvirt/src/virthub_base.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/usbvirt/src/virthub_base.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -54,5 +54,5 @@
 }
 
-int virthub_base_init(virthub_base_t *instance, const char *name,
+errno_t virthub_base_init(virthub_base_t *instance, const char *name,
     usbvirt_device_ops_t *ops, void *data,
     const usb_standard_device_descriptor_t *device_desc,
@@ -109,5 +109,5 @@
 }
 
-int virthub_base_request(virthub_base_t *instance, usb_target_t target,
+errno_t virthub_base_request(virthub_base_t *instance, usb_target_t target,
     usb_direction_t dir, const usb_device_request_setup_packet_t *setup,
     void *buffer, size_t buffer_size, size_t *real_size)
@@ -143,5 +143,5 @@
 }
 
-int virthub_base_get_hub_descriptor(usbvirt_device_t *dev,
+errno_t virthub_base_get_hub_descriptor(usbvirt_device_t *dev,
     const usb_device_request_setup_packet_t *request, uint8_t *data,
     size_t *act_size)
@@ -159,5 +159,5 @@
 }
 
-int virthub_base_get_null_status(usbvirt_device_t *dev,
+errno_t virthub_base_get_null_status(usbvirt_device_t *dev,
     const usb_device_request_setup_packet_t *request, uint8_t *data,
     size_t *act_size)
