Index: uspace/lib/usbdev/src/request.c
===================================================================
--- uspace/lib/usbdev/src/request.c	(revision 585635856440deab73ad5891daab8fa87901aa68)
+++ uspace/lib/usbdev/src/request.c	(revision c81d4f18721cc59f484518c5e3819a401e3e431f)
@@ -68,5 +68,5 @@
  *
  */
-int usb_control_request_set(usb_pipe_t *pipe,
+errno_t usb_control_request_set(usb_pipe_t *pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint8_t request, uint16_t value, uint16_t index,
@@ -127,5 +127,5 @@
  *
  */
-int usb_control_request_get(usb_pipe_t *pipe,
+errno_t usb_control_request_get(usb_pipe_t *pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint8_t request, uint16_t value, uint16_t index,
@@ -170,5 +170,5 @@
  * @return Error code.
  */
-int usb_request_get_status(usb_pipe_t *pipe,
+errno_t usb_request_get_status(usb_pipe_t *pipe,
     usb_request_recipient_t recipient, uint16_t index,
     uint16_t *status)
@@ -184,5 +184,5 @@
 	uint16_t status_usb_endianess;
 	size_t data_transfered_size;
-	int rc = usb_control_request_get(pipe, USB_REQUEST_TYPE_STANDARD,
+	errno_t rc = usb_control_request_get(pipe, USB_REQUEST_TYPE_STANDARD,
 	    recipient, USB_DEVREQ_GET_STATUS, 0, uint16_host2usb(index),
 	    &status_usb_endianess, 2, &data_transfered_size);
@@ -208,5 +208,5 @@
  * @return Error code.
  */
-int usb_request_clear_feature(usb_pipe_t *pipe,
+errno_t usb_request_clear_feature(usb_pipe_t *pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint16_t feature_selector, uint16_t index)
@@ -232,5 +232,5 @@
  * @return Error code.
  */
-int usb_request_set_feature(usb_pipe_t *pipe,
+errno_t usb_request_set_feature(usb_pipe_t *pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint16_t feature_selector, uint16_t index)
@@ -260,5 +260,5 @@
  * @return Error code.
  */
-int usb_request_get_descriptor(usb_pipe_t *pipe,
+errno_t usb_request_get_descriptor(usb_pipe_t *pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint8_t descriptor_type, uint8_t descriptor_index,
@@ -298,5 +298,5 @@
  * @return
  */
-int usb_request_get_descriptor_alloc(usb_pipe_t * pipe,
+errno_t usb_request_get_descriptor_alloc(usb_pipe_t * pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint8_t descriptor_type, uint8_t descriptor_index,
@@ -308,5 +308,5 @@
 	}
 
-	int rc;
+	errno_t rc;
 
 	/*
@@ -364,5 +364,5 @@
  * @return Error code.
  */
-int usb_request_get_device_descriptor(usb_pipe_t *pipe,
+errno_t usb_request_get_device_descriptor(usb_pipe_t *pipe,
     usb_standard_device_descriptor_t *descriptor)
 {
@@ -373,5 +373,5 @@
 	size_t actually_transferred = 0;
 	usb_standard_device_descriptor_t descriptor_tmp;
-	int rc = usb_request_get_descriptor(pipe,
+	errno_t rc = usb_request_get_descriptor(pipe,
 	    USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE,
 	    USB_DESCTYPE_DEVICE, 0, 0, &descriptor_tmp, sizeof(descriptor_tmp),
@@ -404,5 +404,5 @@
  * @return Error code.
  */
-int usb_request_get_bare_configuration_descriptor(usb_pipe_t *pipe,
+errno_t usb_request_get_bare_configuration_descriptor(usb_pipe_t *pipe,
     int index, usb_standard_configuration_descriptor_t *descriptor)
 {
@@ -417,5 +417,5 @@
 	size_t actually_transferred = 0;
 	usb_standard_configuration_descriptor_t descriptor_tmp;
-	const int rc = usb_request_get_descriptor(pipe,
+	const errno_t rc = usb_request_get_descriptor(pipe,
 	    USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE,
 	    USB_DESCTYPE_CONFIGURATION, index, 0,
@@ -448,5 +448,5 @@
  * @return Error code.
  */
-int usb_request_get_full_configuration_descriptor(usb_pipe_t *pipe,
+errno_t usb_request_get_full_configuration_descriptor(usb_pipe_t *pipe,
     int index, void *descriptor, size_t descriptor_size, size_t *actual_size)
 {
@@ -473,9 +473,9 @@
  * @return Error code.
  */
-int usb_request_get_full_configuration_descriptor_alloc(
+errno_t usb_request_get_full_configuration_descriptor_alloc(
     usb_pipe_t *pipe, int index,
     const void **descriptor_ptr, size_t *descriptor_size)
 {
-	int rc;
+	errno_t rc;
 
 	if (descriptor_ptr == NULL) {
@@ -539,5 +539,5 @@
  * @return Error code.
  */
-int usb_request_set_descriptor(usb_pipe_t *pipe,
+errno_t usb_request_set_descriptor(usb_pipe_t *pipe,
     usb_request_type_t request_type, usb_request_recipient_t recipient,
     uint8_t descriptor_type, uint8_t descriptor_index,
@@ -565,5 +565,5 @@
  * @return Error code.
  */
-int usb_request_get_configuration(usb_pipe_t *pipe,
+errno_t usb_request_get_configuration(usb_pipe_t *pipe,
     uint8_t *configuration_value)
 {
@@ -571,5 +571,5 @@
 	size_t actual_size;
 
-	const int rc = usb_control_request_get(pipe,
+	const errno_t rc = usb_control_request_get(pipe,
 	    USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE,
 	    USB_DEVREQ_GET_CONFIGURATION, 0, 0, &value, 1, &actual_size);
@@ -595,5 +595,5 @@
  * @return Error code.
  */
-int usb_request_set_configuration(usb_pipe_t *pipe,
+errno_t usb_request_set_configuration(usb_pipe_t *pipe,
     uint8_t configuration_value)
 {
@@ -614,5 +614,5 @@
  * @return Error code.
  */
-int usb_request_get_interface(usb_pipe_t *pipe,
+errno_t usb_request_get_interface(usb_pipe_t *pipe,
     uint8_t interface_index, uint8_t *alternate_setting)
 {
@@ -620,5 +620,5 @@
 	size_t actual_size;
 
-	const int rc = usb_control_request_get(pipe,
+	const errno_t rc = usb_control_request_get(pipe,
 	    USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_INTERFACE,
 	    USB_DEVREQ_GET_INTERFACE,
@@ -647,5 +647,5 @@
  * @return Error code.
  */
-int usb_request_set_interface(usb_pipe_t *pipe,
+errno_t usb_request_set_interface(usb_pipe_t *pipe,
     uint8_t interface_index, uint8_t alternate_setting)
 {
@@ -666,5 +666,5 @@
  * @return Error code.
  */
-int usb_request_get_supported_languages(usb_pipe_t *pipe,
+errno_t usb_request_get_supported_languages(usb_pipe_t *pipe,
     l18_win_locales_t **languages_ptr, size_t *languages_count)
 {
@@ -675,5 +675,5 @@
 	uint8_t *string_descriptor = NULL;
 	size_t string_descriptor_size = 0;
-	const int rc = usb_request_get_descriptor_alloc(pipe,
+	const errno_t rc = usb_request_get_descriptor_alloc(pipe,
 	    USB_REQUEST_TYPE_STANDARD, USB_REQUEST_RECIPIENT_DEVICE,
 	    USB_DESCTYPE_STRING, 0, 0,
@@ -733,5 +733,5 @@
  * @return Error code.
  */
-int usb_request_get_string(usb_pipe_t *pipe,
+errno_t usb_request_get_string(usb_pipe_t *pipe,
     size_t index, l18_win_locales_t lang, char **string_ptr)
 {
@@ -751,5 +751,5 @@
 	}
 
-	int rc;
+	errno_t rc;
 
 	/* Prepare dynamically allocated variables. */
@@ -824,5 +824,5 @@
  * @return Error code.
  */
-int usb_request_clear_endpoint_halt(usb_pipe_t *pipe, uint16_t ep_index)
+errno_t usb_request_clear_endpoint_halt(usb_pipe_t *pipe, uint16_t ep_index)
 {
 	return usb_request_clear_feature(pipe,
@@ -838,5 +838,5 @@
  * @return Error code.
  */
-int usb_pipe_clear_halt(usb_pipe_t *ctrl_pipe, usb_pipe_t *target_pipe)
+errno_t usb_pipe_clear_halt(usb_pipe_t *ctrl_pipe, usb_pipe_t *target_pipe)
 {
 	if ((ctrl_pipe == NULL) || (target_pipe == NULL)) {
@@ -854,10 +854,10 @@
  * @return Error code.
  */
-int usb_request_get_endpoint_status(usb_pipe_t *ctrl_pipe, usb_pipe_t *pipe,
+errno_t usb_request_get_endpoint_status(usb_pipe_t *ctrl_pipe, usb_pipe_t *pipe,
     uint16_t *status)
 {
 	uint16_t status_tmp;
 	uint16_t pipe_index = (uint16_t) pipe->endpoint_no;
-	int rc = usb_request_get_status(ctrl_pipe,
+	errno_t rc = usb_request_get_status(ctrl_pipe,
 	    USB_REQUEST_RECIPIENT_ENDPOINT, uint16_host2usb(pipe_index),
 	    &status_tmp);
