Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_usbhc.c

    r25a179e rb7fd2a0  
    9696} usbhc_iface_funcs_t;
    9797
    98 int usbhc_read(async_exch_t *exch, usb_address_t address,
     98errno_t usbhc_read(async_exch_t *exch, usb_address_t address,
    9999    usb_endpoint_t endpoint, uint64_t setup, void *data, size_t size,
    100100    size_t *rec_size)
     
    131131
    132132        /* Wait for the answer. */
    133         int data_request_rc;
    134         int opening_request_rc;
     133        errno_t data_request_rc;
     134        errno_t opening_request_rc;
    135135        async_wait_for(data_request, &data_request_rc);
    136136        async_wait_for(opening_request, &opening_request_rc);
     
    139139                /* Prefer the return code of the opening request. */
    140140                if (opening_request_rc != EOK) {
    141                         return (int) opening_request_rc;
     141                        return (errno_t) opening_request_rc;
    142142                } else {
    143                         return (int) data_request_rc;
     143                        return (errno_t) data_request_rc;
    144144                }
    145145        }
    146146        if (opening_request_rc != EOK) {
    147                 return (int) opening_request_rc;
     147                return (errno_t) opening_request_rc;
    148148        }
    149149
     
    152152}
    153153
    154 int usbhc_write(async_exch_t *exch, usb_address_t address,
     154errno_t usbhc_write(async_exch_t *exch, usb_address_t address,
    155155    usb_endpoint_t endpoint, uint64_t setup, const void *data, size_t size)
    156156{
     
    174174        /* Send the data if any. */
    175175        if (size > 0) {
    176                 const int ret = async_data_write_start(exch, data, size);
     176                const errno_t ret = async_data_write_start(exch, data, size);
    177177                if (ret != EOK) {
    178178                        async_forget(opening_request);
     
    182182
    183183        /* Wait for the answer. */
    184         int opening_request_rc;
     184        errno_t opening_request_rc;
    185185        async_wait_for(opening_request, &opening_request_rc);
    186186
    187         return (int) opening_request_rc;
     187        return (errno_t) opening_request_rc;
    188188}
    189189
     
    235235}
    236236
    237 static void callback_out(int outcome, void *arg)
     237static void callback_out(errno_t outcome, void *arg)
    238238{
    239239        async_transaction_t *trans = arg;
     
    244244}
    245245
    246 static void callback_in(int outcome, size_t actual_size, void *arg)
     246static void callback_in(errno_t outcome, size_t actual_size, void *arg)
    247247{
    248248        async_transaction_t *trans = (async_transaction_t *)arg;
     
    306306        }
    307307
    308         const int rc = hc_iface->read(
     308        const errno_t rc = hc_iface->read(
    309309            fun, target, setup, trans->buffer, size, callback_in, trans);
    310310
     
    344344        size_t size = 0;
    345345        if (data_buffer_len > 0) {
    346                 const int rc = async_data_write_accept(&trans->buffer, false,
     346                const errno_t rc = async_data_write_accept(&trans->buffer, false,
    347347                    1, USB_MAX_PAYLOAD_SIZE,
    348348                    0, &size);
     
    355355        }
    356356
    357         const int rc = hc_iface->write(
     357        const errno_t rc = hc_iface->write(
    358358            fun, target, setup, trans->buffer, size, callback_out, trans);
    359359
Note: See TracChangeset for help on using the changeset viewer.