Changes in uspace/drv/char/sun4v-con/sun4v-con.c [39026d7c:b7fd2a0] in mainline
- File:
-
- 1 edited
-
uspace/drv/char/sun4v-con/sun4v-con.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/sun4v-con/sun4v-con.c
r39026d7c rb7fd2a0 36 36 #include <ddi.h> 37 37 #include <errno.h> 38 #include <str_error.h> 38 39 #include <io/chardev_srv.h> 39 40 #include <stdbool.h> … … 45 46 #define POLL_INTERVAL 10000 46 47 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 *);48 static errno_t sun4v_con_read(chardev_srv_t *, void *, size_t, size_t *); 49 static errno_t sun4v_con_write(chardev_srv_t *, const void *, size_t, size_t *); 49 50 50 51 static chardev_ops_t sun4v_con_chardev_ops = { … … 68 69 69 70 /** Add sun4v console device. */ 70 int sun4v_con_add(sun4v_con_t *con, sun4v_con_res_t *res)71 errno_t sun4v_con_add(sun4v_con_t *con, sun4v_con_res_t *res) 71 72 { 72 73 ddf_fun_t *fun = NULL; 73 int rc;74 errno_t rc; 74 75 75 76 con->res = *res; … … 92 93 (void *) &con->input_buffer); 93 94 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)); 95 96 goto error; 96 97 } … … 101 102 (void *) &con->output_buffer); 102 103 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)); 104 105 return rc; 105 106 } … … 128 129 129 130 /** Remove sun4v console device */ 130 int sun4v_con_remove(sun4v_con_t *con)131 errno_t sun4v_con_remove(sun4v_con_t *con) 131 132 { 132 133 return ENOTSUP; … … 134 135 135 136 /** Msim console device gone */ 136 int sun4v_con_gone(sun4v_con_t *con)137 errno_t sun4v_con_gone(sun4v_con_t *con) 137 138 { 138 139 return ENOTSUP; … … 140 141 141 142 /** Read from Sun4v console device */ 142 static int sun4v_con_read(chardev_srv_t *srv, void *buf, size_t size,143 static errno_t sun4v_con_read(chardev_srv_t *srv, void *buf, size_t size, 143 144 size_t *nread) 144 145 { … … 164 165 165 166 /** Write to Sun4v console device */ 166 static int sun4v_con_write(chardev_srv_t *srv, const void *data, size_t size,167 static errno_t sun4v_con_write(chardev_srv_t *srv, const void *data, size_t size, 167 168 size_t *nwr) 168 169 {
Note:
See TracChangeset
for help on using the changeset viewer.
