Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/chardev.c

    r19ea61d rb7fd2a0  
    5050 * @return EOK on success, ENOMEM if out of memory, EIO on I/O error
    5151 */
    52 int chardev_open(async_sess_t *sess, chardev_t **rchardev)
     52errno_t chardev_open(async_sess_t *sess, chardev_t **rchardev)
    5353{
    5454        chardev_t *chardev;
     
    9494 * @return EOK on success or non-zero error code
    9595 */
    96 int chardev_read(chardev_t *chardev, void *buf, size_t size, size_t *nread)
     96errno_t chardev_read(chardev_t *chardev, void *buf, size_t size, size_t *nread)
    9797{
    9898        async_exch_t *exch = async_exchange_begin(chardev->sess);
     
    105105        ipc_call_t answer;
    106106        aid_t req = async_send_0(exch, CHARDEV_READ, &answer);
    107         int rc = async_data_read_start(exch, buf, size);
     107        errno_t rc = async_data_read_start(exch, buf, size);
    108108        async_exchange_end(exch);
    109109
     
    114114        }
    115115
    116         sysarg_t retval;
     116        errno_t retval;
    117117        async_wait_for(req, &retval);
    118118
     
    124124        *nread = IPC_GET_ARG2(answer);
    125125        /* In case of partial success, ARG1 contains the error code */
    126         return IPC_GET_ARG1(answer);
     126        return (errno_t) IPC_GET_ARG1(answer);
    127127
    128128}
     
    144144 * @return EOK on success or non-zero error code
    145145 */
    146 static int chardev_write_once(chardev_t *chardev, const void *data,
     146static errno_t chardev_write_once(chardev_t *chardev, const void *data,
    147147    size_t size, size_t *nwritten)
    148148{
     
    150150        ipc_call_t answer;
    151151        aid_t req;
    152         int rc;
     152        errno_t rc;
    153153
    154154        /* Break down large transfers */
     
    166166        }
    167167
    168         sysarg_t retval;
     168        errno_t retval;
    169169        async_wait_for(req, &retval);
    170170        if (retval != EOK) {
     
    175175        *nwritten = IPC_GET_ARG2(answer);
    176176        /* In case of partial success, ARG1 contains the error code */
    177         return IPC_GET_ARG1(answer);
     177        return (errno_t) IPC_GET_ARG1(answer);
    178178}
    179179
     
    193193 * @return EOK on success or non-zero error code
    194194 */
    195 int chardev_write(chardev_t *chardev, const void *data, size_t size,
     195errno_t chardev_write(chardev_t *chardev, const void *data, size_t size,
    196196    size_t *nwritten)
    197197{
    198198        size_t nw;
    199199        size_t p;
    200         int rc;
     200        errno_t rc;
    201201
    202202        p = 0;
Note: See TracChangeset for help on using the changeset viewer.