Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/sun4v-con/sun4v-con.c

    r39026d7c rb7fd2a0  
    3636#include <ddi.h>
    3737#include <errno.h>
     38#include <str_error.h>
    3839#include <io/chardev_srv.h>
    3940#include <stdbool.h>
     
    4546#define POLL_INTERVAL  10000
    4647
    47 static int sun4v_con_read(chardev_srv_t *, void *, size_t, size_t *);
    48 static int sun4v_con_write(chardev_srv_t *, const void *, size_t, size_t *);
     48static errno_t sun4v_con_read(chardev_srv_t *, void *, size_t, size_t *);
     49static errno_t sun4v_con_write(chardev_srv_t *, const void *, size_t, size_t *);
    4950
    5051static chardev_ops_t sun4v_con_chardev_ops = {
     
    6869
    6970/** Add sun4v console device. */
    70 int sun4v_con_add(sun4v_con_t *con, sun4v_con_res_t *res)
     71errno_t sun4v_con_add(sun4v_con_t *con, sun4v_con_res_t *res)
    7172{
    7273        ddf_fun_t *fun = NULL;
    73         int rc;
     74        errno_t rc;
    7475
    7576        con->res = *res;
     
    9293            (void *) &con->input_buffer);
    9394        if (rc != EOK) {
    94                 ddf_msg(LVL_ERROR, "Error mapping memory: %d", rc);
     95                ddf_msg(LVL_ERROR, "Error mapping memory: %s", str_error_name(rc));
    9596                goto error;
    9697        }
     
    101102            (void *) &con->output_buffer);
    102103        if (rc != EOK) {
    103                 ddf_msg(LVL_ERROR, "Error mapping memory: %d", rc);
     104                ddf_msg(LVL_ERROR, "Error mapping memory: %s", str_error_name(rc));
    104105                return rc;
    105106        }
     
    128129
    129130/** Remove sun4v console device */
    130 int sun4v_con_remove(sun4v_con_t *con)
     131errno_t sun4v_con_remove(sun4v_con_t *con)
    131132{
    132133        return ENOTSUP;
     
    134135
    135136/** Msim console device gone */
    136 int sun4v_con_gone(sun4v_con_t *con)
     137errno_t sun4v_con_gone(sun4v_con_t *con)
    137138{
    138139        return ENOTSUP;
     
    140141
    141142/** Read from Sun4v console device */
    142 static int sun4v_con_read(chardev_srv_t *srv, void *buf, size_t size,
     143static errno_t sun4v_con_read(chardev_srv_t *srv, void *buf, size_t size,
    143144    size_t *nread)
    144145{
     
    164165
    165166/** Write to Sun4v console device */
    166 static int sun4v_con_write(chardev_srv_t *srv, const void *data, size_t size,
     167static errno_t sun4v_con_write(chardev_srv_t *srv, const void *data, size_t size,
    167168    size_t *nwr)
    168169{
Note: See TracChangeset for help on using the changeset viewer.