Index: uspace/lib/c/generic/io/chardev.c
===================================================================
--- uspace/lib/c/generic/io/chardev.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/chardev.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -50,5 +50,5 @@
  * @return EOK on success, ENOMEM if out of memory, EIO on I/O error
  */
-int chardev_open(async_sess_t *sess, chardev_t **rchardev)
+errno_t chardev_open(async_sess_t *sess, chardev_t **rchardev)
 {
 	chardev_t *chardev;
@@ -94,5 +94,5 @@
  * @return EOK on success or non-zero error code
  */
-int chardev_read(chardev_t *chardev, void *buf, size_t size, size_t *nread)
+errno_t chardev_read(chardev_t *chardev, void *buf, size_t size, size_t *nread)
 {
 	async_exch_t *exch = async_exchange_begin(chardev->sess);
@@ -105,5 +105,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, CHARDEV_READ, &answer);
-	int rc = async_data_read_start(exch, buf, size);
+	errno_t rc = async_data_read_start(exch, buf, size);
 	async_exchange_end(exch);
 
@@ -114,5 +114,5 @@
 	}
 
-	int retval;
+	errno_t retval;
 	async_wait_for(req, &retval);
 
@@ -124,5 +124,5 @@
 	*nread = IPC_GET_ARG2(answer);
 	/* In case of partial success, ARG1 contains the error code */
-	return (int) IPC_GET_ARG1(answer);
+	return (errno_t) IPC_GET_ARG1(answer);
 
 }
@@ -144,5 +144,5 @@
  * @return EOK on success or non-zero error code
  */
-static int chardev_write_once(chardev_t *chardev, const void *data,
+static errno_t chardev_write_once(chardev_t *chardev, const void *data,
     size_t size, size_t *nwritten)
 {
@@ -150,5 +150,5 @@
 	ipc_call_t answer;
 	aid_t req;
-	int rc;
+	errno_t rc;
 
 	/* Break down large transfers */
@@ -166,5 +166,5 @@
 	}
 
-	int retval;
+	errno_t retval;
 	async_wait_for(req, &retval);
 	if (retval != EOK) {
@@ -175,5 +175,5 @@
 	*nwritten = IPC_GET_ARG2(answer);
 	/* In case of partial success, ARG1 contains the error code */
-	return (int) IPC_GET_ARG1(answer);
+	return (errno_t) IPC_GET_ARG1(answer);
 }
 
@@ -193,10 +193,10 @@
  * @return EOK on success or non-zero error code
  */
-int chardev_write(chardev_t *chardev, const void *data, size_t size,
+errno_t chardev_write(chardev_t *chardev, const void *data, size_t size,
     size_t *nwritten)
 {
 	size_t nw;
 	size_t p;
-	int rc;
+	errno_t rc;
 
 	p = 0;
Index: uspace/lib/c/generic/io/chardev_srv.c
===================================================================
--- uspace/lib/c/generic/io/chardev_srv.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/chardev_srv.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -49,5 +49,5 @@
 	size_t size;
 	size_t nread;
-	int rc;
+	errno_t rc;
 	ipc_callid_t rcallid;
 
@@ -91,5 +91,5 @@
 	size_t size;
 	size_t nwr;
-	int rc;
+	errno_t rc;
 
 	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
@@ -132,8 +132,8 @@
 }
 
-int chardev_conn(ipc_callid_t iid, ipc_call_t *icall, chardev_srvs_t *srvs)
+errno_t chardev_conn(ipc_callid_t iid, ipc_call_t *icall, chardev_srvs_t *srvs)
 {
 	chardev_srv_t *srv;
-	int rc;
+	errno_t rc;
 
 	/* Accept the connection */
Index: uspace/lib/c/generic/io/con_srv.c
===================================================================
--- uspace/lib/c/generic/io/con_srv.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/con_srv.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -42,5 +42,5 @@
 #include <io/con_srv.h>
 
-static int console_ev_encode(cons_event_t *event, ipc_call_t *call)
+static errno_t console_ev_encode(cons_event_t *event, ipc_call_t *call)
 {
 	IPC_SET_ARG1(*call, event->type);
@@ -71,5 +71,5 @@
 	void *buf;
 	size_t size;
-	int rc;
+	errno_t rc;
 	ipc_callid_t rcallid;
 
@@ -113,5 +113,5 @@
 	void *data;
 	size_t size;
-	int rc;
+	errno_t rc;
 
 	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
@@ -178,5 +178,5 @@
     ipc_call_t *call)
 {
-	int rc;
+	errno_t rc;
 	sysarg_t col;
 	sysarg_t row;
@@ -194,5 +194,5 @@
     ipc_call_t *call)
 {
-	int rc;
+	errno_t rc;
 	sysarg_t cols;
 	sysarg_t rows;
@@ -210,5 +210,5 @@
     ipc_call_t *call)
 {
-	int rc;
+	errno_t rc;
 	console_caps_t ccap;
 
@@ -295,5 +295,5 @@
     ipc_call_t *call)
 {
-	int rc;
+	errno_t rc;
 	cons_event_t event;
 	ipc_call_t result;
@@ -340,8 +340,8 @@
 }
 
-int con_conn(ipc_callid_t iid, ipc_call_t *icall, con_srvs_t *srvs)
+errno_t con_conn(ipc_callid_t iid, ipc_call_t *icall, con_srvs_t *srvs)
 {
 	con_srv_t *srv;
-	int rc;
+	errno_t rc;
 
 	/* Accept the connection */
Index: uspace/lib/c/generic/io/console.c
===================================================================
--- uspace/lib/c/generic/io/console.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/console.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -90,8 +90,8 @@
 }
 
-int console_get_size(console_ctrl_t *ctrl, sysarg_t *cols, sysarg_t *rows)
-{
-	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
-	int rc = async_req_0_2(exch, CONSOLE_GET_SIZE, cols, rows);
+errno_t console_get_size(console_ctrl_t *ctrl, sysarg_t *cols, sysarg_t *rows)
+{
+	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
+	errno_t rc = async_req_0_2(exch, CONSOLE_GET_SIZE, cols, rows);
 	async_exchange_end(exch);
 	
@@ -129,8 +129,8 @@
 }
 
-int console_get_color_cap(console_ctrl_t *ctrl, sysarg_t *ccap)
-{
-	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
-	int rc = async_req_0_1(exch, CONSOLE_GET_COLOR_CAP, ccap);
+errno_t console_get_color_cap(console_ctrl_t *ctrl, sysarg_t *ccap)
+{
+	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
+	errno_t rc = async_req_0_1(exch, CONSOLE_GET_COLOR_CAP, ccap);
 	async_exchange_end(exch);
 	
@@ -138,8 +138,8 @@
 }
 
-int console_get_pos(console_ctrl_t *ctrl, sysarg_t *col, sysarg_t *row)
-{
-	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
-	int rc = async_req_0_2(exch, CONSOLE_GET_POS, col, row);
+errno_t console_get_pos(console_ctrl_t *ctrl, sysarg_t *col, sysarg_t *row)
+{
+	async_exch_t *exch = async_exchange_begin(ctrl->output_sess);
+	errno_t rc = async_req_0_2(exch, CONSOLE_GET_POS, col, row);
 	async_exchange_end(exch);
 	
@@ -154,5 +154,5 @@
 }
 
-static int console_ev_decode(ipc_call_t *call, cons_event_t *event)
+static errno_t console_ev_decode(ipc_call_t *call, cons_event_t *event)
 {
 	event->type = IPC_GET_ARG1(*call);
@@ -188,5 +188,5 @@
 		async_exchange_end(exch);
 		
-		int rc;
+		errno_t rc;
 		async_wait_for(aid, &rc);
 		
@@ -202,5 +202,5 @@
 		}
 	} else {
-		int retval;
+		errno_t retval;
 		async_wait_for(ctrl->input_aid, &retval);
 		
@@ -212,5 +212,5 @@
 		}
 		
-		int rc = console_ev_decode(&ctrl->input_call, event);
+		errno_t rc = console_ev_decode(&ctrl->input_call, event);
 		if (rc != EOK) {
 			errno = rc;
@@ -235,6 +235,6 @@
 	}
 	
-	int retval;
-	int rc = async_wait_timeout(ctrl->input_aid, &retval, *timeout);
+	errno_t retval;
+	errno_t rc = async_wait_timeout(ctrl->input_aid, &retval, *timeout);
 	if (rc != EOK) {
 		*timeout = 0;
Index: uspace/lib/c/generic/io/input.c
===================================================================
--- uspace/lib/c/generic/io/input.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/input.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -45,5 +45,5 @@
 static void input_cb_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg);
 
-int input_open(async_sess_t *sess, input_ev_ops_t *ev_ops,
+errno_t input_open(async_sess_t *sess, input_ev_ops_t *ev_ops,
     void *arg, input_t **rinput)
 {
@@ -59,5 +59,5 @@
 
 	port_id_t port;
-	int rc = async_create_callback_port(exch, INTERFACE_INPUT_CB, 0, 0,
+	errno_t rc = async_create_callback_port(exch, INTERFACE_INPUT_CB, 0, 0,
 	    input_cb_conn, input, &port);
 	
@@ -83,8 +83,8 @@
 }
 
-int input_activate(input_t *input)
+errno_t input_activate(input_t *input)
 {
 	async_exch_t *exch = async_exchange_begin(input->sess);
-	int rc = async_req_0_0(exch, INPUT_ACTIVATE);
+	errno_t rc = async_req_0_0(exch, INPUT_ACTIVATE);
 	async_exchange_end(exch);
 	
@@ -95,5 +95,5 @@
     ipc_call_t *call)
 {
-	int rc = input->ev_ops->active(input);
+	errno_t rc = input->ev_ops->active(input);
 	async_answer_0(callid, rc);
 }
@@ -102,5 +102,5 @@
     ipc_call_t *call)
 {
-	int rc = input->ev_ops->deactive(input);
+	errno_t rc = input->ev_ops->deactive(input);
 	async_answer_0(callid, rc);
 }
@@ -113,5 +113,5 @@
 	keymod_t mods;
 	wchar_t c;
-	int rc;
+	errno_t rc;
 
 	type = IPC_GET_ARG1(*call);
@@ -129,5 +129,5 @@
 	int dx;
 	int dy;
-	int rc;
+	errno_t rc;
 
 	dx = IPC_GET_ARG1(*call);
@@ -145,5 +145,5 @@
 	unsigned max_x;
 	unsigned max_y;
-	int rc;
+	errno_t rc;
 
 	x = IPC_GET_ARG1(*call);
@@ -161,5 +161,5 @@
 	int bnum;
 	int press;
-	int rc;
+	errno_t rc;
 
 	bnum = IPC_GET_ARG1(*call);
Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/io.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -297,5 +297,5 @@
 		flags |= WALK_MAY_CREATE;
 	int file;
-	int rc = vfs_lookup(path, flags, &file);
+	errno_t rc = vfs_lookup(path, flags, &file);
 	if (rc != EOK) {
 		errno = rc;
@@ -364,5 +364,5 @@
 static int _fclose_nofree(FILE *stream)
 {
-	int rc = 0;
+	errno_t rc = 0;
 	
 	fflush(stream);
@@ -433,5 +433,5 @@
 static size_t _fread(void *buf, size_t size, size_t nmemb, FILE *stream)
 {
-	int rc;
+	errno_t rc;
 	size_t nread;
 
@@ -462,5 +462,5 @@
 static size_t _fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
 {
-	int rc;
+	errno_t rc;
 	size_t nwritten;
 
@@ -495,5 +495,5 @@
 static void _ffillbuf(FILE *stream)
 {
-	int rc;
+	errno_t rc;
 	size_t nread;
 
@@ -801,5 +801,5 @@
 int fseek(FILE *stream, long offset, int whence)
 {
-	int rc;
+	errno_t rc;
 
 	if (stream->error)
@@ -877,5 +877,5 @@
 	
 	if ((stream->fd >= 0) && (stream->need_sync)) {
-		int rc;
+		errno_t rc;
 
 		/**
@@ -934,5 +934,5 @@
 }
 
-int vfs_fhandle(FILE *stream, int *handle)
+errno_t vfs_fhandle(FILE *stream, int *handle)
 {
 	if (stream->fd >= 0) {
Index: uspace/lib/c/generic/io/kio.c
===================================================================
--- uspace/lib/c/generic/io/kio.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/kio.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -43,7 +43,7 @@
 #include <io/printf_core.h>
 
-int kio_write(const void *buf, size_t size, size_t *nwritten)
+errno_t kio_write(const void *buf, size_t size, size_t *nwritten)
 {
-	int rc = (int) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) buf, size);
+	errno_t rc = (errno_t) __SYSCALL3(SYS_KIO, KIO_WRITE, (sysarg_t) buf, size);
 	
 	if (rc == EOK)
Index: uspace/lib/c/generic/io/klog.c
===================================================================
--- uspace/lib/c/generic/io/klog.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/klog.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -42,13 +42,13 @@
 #include <abi/log.h>
 
-int klog_write(log_level_t lvl, const void *buf, size_t size)
+errno_t klog_write(log_level_t lvl, const void *buf, size_t size)
 {
-	return (int) __SYSCALL4(SYS_KLOG, KLOG_WRITE, (sysarg_t) buf,
+	return (errno_t) __SYSCALL4(SYS_KLOG, KLOG_WRITE, (sysarg_t) buf,
 	    size, lvl);
 }
 
-int klog_read(void *data, size_t size, size_t *nread)
+errno_t klog_read(void *data, size_t size, size_t *nread)
 {
-	return (int) __SYSCALL5(SYS_KLOG, KLOG_READ, (uintptr_t) data,
+	return (errno_t) __SYSCALL5(SYS_KLOG, KLOG_READ, (uintptr_t) data,
 	    size, 0, (sysarg_t) nread);
 }
Index: uspace/lib/c/generic/io/log.c
===================================================================
--- uspace/lib/c/generic/io/log.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/log.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -74,5 +74,5 @@
  * @return Error code of the conversion or EOK on success.
  */
-static int logger_message(async_sess_t *session, log_t log, log_level_t level, char *message)
+static errno_t logger_message(async_sess_t *session, log_t log, log_level_t level, char *message)
 {
 	async_exch_t *exchange = async_exchange_begin(session);
@@ -88,6 +88,6 @@
 	aid_t reg_msg = async_send_2(exchange, LOGGER_WRITER_MESSAGE,
 	    log, level, NULL);
-	int rc = async_data_write_start(exchange, message, str_size(message));
-	int reg_msg_rc;
+	errno_t rc = async_data_write_start(exchange, message, str_size(message));
+	errno_t reg_msg_rc;
 	async_wait_for(reg_msg, &reg_msg_rc);
 
@@ -127,5 +127,5 @@
  * @return Error code of the conversion or EOK on success.
  */
-int log_level_from_str(const char *name, log_level_t *level_out)
+errno_t log_level_from_str(const char *name, log_level_t *level_out)
 {
 	log_level_t level = LVL_FATAL;
@@ -160,5 +160,5 @@
  * @param prog_name Program name, will be printed as part of message
  */
-int log_init(const char *prog_name)
+errno_t log_init(const char *prog_name)
 {
 	log_prog_name = str_dup(prog_name);
@@ -198,6 +198,6 @@
 	aid_t reg_msg = async_send_1(exchange, LOGGER_WRITER_CREATE_LOG,
 	    parent, &answer);
-	int rc = async_data_write_start(exchange, name, str_size(name));
-	int reg_msg_rc;
+	errno_t rc = async_data_write_start(exchange, name, str_size(name));
+	errno_t reg_msg_rc;
 	async_wait_for(reg_msg, &reg_msg_rc);
 
Index: uspace/lib/c/generic/io/logctl.c
===================================================================
--- uspace/lib/c/generic/io/logctl.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/logctl.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -43,5 +43,5 @@
 static async_sess_t *logger_session = NULL;
 
-static int start_logger_exchange(async_exch_t **exchange_out)
+static errno_t start_logger_exchange(async_exch_t **exchange_out)
 {
 	assert(exchange_out != NULL);
@@ -78,12 +78,12 @@
  * @return Error code of the conversion or EOK on success.
  */
-int logctl_set_default_level(log_level_t new_level)
+errno_t logctl_set_default_level(log_level_t new_level)
 {
 	async_exch_t *exchange = NULL;
-	int rc = start_logger_exchange(&exchange);
+	errno_t rc = start_logger_exchange(&exchange);
 	if (rc != EOK)
 		return rc;
 
-	rc = (int) async_req_1_0(exchange,
+	rc = (errno_t) async_req_1_0(exchange,
 	    LOGGER_CONTROL_SET_DEFAULT_LEVEL, new_level);
 
@@ -101,8 +101,8 @@
  * @return Error code of the conversion or EOK on success.
  */
-int logctl_set_log_level(const char *logname, log_level_t new_level)
+errno_t logctl_set_log_level(const char *logname, log_level_t new_level)
 {
 	async_exch_t *exchange = NULL;
-	int rc = start_logger_exchange(&exchange);
+	errno_t rc = start_logger_exchange(&exchange);
 	if (rc != EOK)
 		return rc;
@@ -111,5 +111,5 @@
 	    new_level, NULL);
 	rc = async_data_write_start(exchange, logname, str_size(logname));
-	int reg_msg_rc;
+	errno_t reg_msg_rc;
 	async_wait_for(reg_msg, &reg_msg_rc);
 
@@ -119,5 +119,5 @@
 		return rc;
 
-	return (int) reg_msg_rc;
+	return (errno_t) reg_msg_rc;
 }
 
@@ -126,8 +126,8 @@
  * @return Error code or EOK on success.
  */
-int logctl_set_root(void)
+errno_t logctl_set_root(void)
 {
 	async_exch_t *exchange = NULL;
-	int rc = start_logger_exchange(&exchange);
+	errno_t rc = start_logger_exchange(&exchange);
 	if (rc != EOK)
 		return rc;
@@ -137,5 +137,5 @@
 	rc = vfs_pass_handle(vfs_exch, vfs_root(), exchange);
 	vfs_exchange_end(vfs_exch);
-	int reg_msg_rc;
+	errno_t reg_msg_rc;
 	async_wait_for(reg_msg, &reg_msg_rc);
 
@@ -145,5 +145,5 @@
 		return rc;
 
-	return (int) reg_msg_rc;
+	return (errno_t) reg_msg_rc;
 }
 
Index: uspace/lib/c/generic/io/output.c
===================================================================
--- uspace/lib/c/generic/io/output.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/output.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -40,8 +40,8 @@
 #include <io/output.h>
 
-int output_yield(async_sess_t *sess)
+errno_t output_yield(async_sess_t *sess)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, OUTPUT_YIELD);
+	errno_t ret = async_req_0_0(exch, OUTPUT_YIELD);
 	async_exchange_end(exch);
 	
@@ -49,8 +49,8 @@
 }
 
-int output_claim(async_sess_t *sess)
+errno_t output_claim(async_sess_t *sess)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, OUTPUT_CLAIM);
+	errno_t ret = async_req_0_0(exch, OUTPUT_CLAIM);
 	async_exchange_end(exch);
 	
@@ -58,8 +58,8 @@
 }
 
-int output_get_dimensions(async_sess_t *sess, sysarg_t *maxx, sysarg_t *maxy)
+errno_t output_get_dimensions(async_sess_t *sess, sysarg_t *maxx, sysarg_t *maxy)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_2(exch, OUTPUT_GET_DIMENSIONS, maxx, maxy);
+	errno_t ret = async_req_0_2(exch, OUTPUT_GET_DIMENSIONS, maxx, maxy);
 	async_exchange_end(exch);
 	
@@ -67,10 +67,10 @@
 }
 
-int output_get_caps(async_sess_t *sess, console_caps_t *ccaps)
+errno_t output_get_caps(async_sess_t *sess, console_caps_t *ccaps)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
 	
 	sysarg_t rv;
-	int ret = async_req_0_1(exch, OUTPUT_GET_CAPS, &rv);
+	errno_t ret = async_req_0_1(exch, OUTPUT_GET_CAPS, &rv);
 	
 	async_exchange_end(exch);
@@ -89,10 +89,10 @@
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, OUTPUT_FRONTBUF_CREATE, &answer);
-	int rc = async_share_out_start(exch, frontbuf, AS_AREA_READ
+	errno_t rc = async_share_out_start(exch, frontbuf, AS_AREA_READ
 	    | AS_AREA_WRITE | AS_AREA_CACHEABLE);
 	
 	async_exchange_end(exch);
 	
-	int ret;
+	errno_t ret;
 	async_wait_for(req, &ret);
 	
@@ -103,8 +103,8 @@
 }
 
-int output_set_style(async_sess_t *sess, console_style_t style)
+errno_t output_set_style(async_sess_t *sess, console_style_t style)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_1_0(exch, OUTPUT_SET_STYLE, style);
+	errno_t ret = async_req_1_0(exch, OUTPUT_SET_STYLE, style);
 	async_exchange_end(exch);
 	
@@ -112,8 +112,8 @@
 }
 
-int output_cursor_update(async_sess_t *sess, frontbuf_handle_t frontbuf)
+errno_t output_cursor_update(async_sess_t *sess, frontbuf_handle_t frontbuf)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_1_0(exch, OUTPUT_CURSOR_UPDATE, frontbuf);
+	errno_t ret = async_req_1_0(exch, OUTPUT_CURSOR_UPDATE, frontbuf);
 	async_exchange_end(exch);
 	
@@ -121,8 +121,8 @@
 }
 
-int output_update(async_sess_t *sess, frontbuf_handle_t frontbuf)
+errno_t output_update(async_sess_t *sess, frontbuf_handle_t frontbuf)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_1_0(exch, OUTPUT_UPDATE, frontbuf);
+	errno_t ret = async_req_1_0(exch, OUTPUT_UPDATE, frontbuf);
 	async_exchange_end(exch);
 	
@@ -130,9 +130,9 @@
 }
 
-int output_damage(async_sess_t *sess, frontbuf_handle_t frontbuf, sysarg_t col,
+errno_t output_damage(async_sess_t *sess, frontbuf_handle_t frontbuf, sysarg_t col,
     sysarg_t row, sysarg_t cols, sysarg_t rows)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_5_0(exch, OUTPUT_DAMAGE, frontbuf, col, row,
+	errno_t ret = async_req_5_0(exch, OUTPUT_DAMAGE, frontbuf, col, row,
 	    cols, rows);
 	async_exchange_end(exch);
Index: uspace/lib/c/generic/io/serial.c
===================================================================
--- uspace/lib/c/generic/io/serial.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/serial.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -41,5 +41,5 @@
  * @return EOK on success, ENOMEM if out of memory, EIO on I/O error
  */
-int serial_open(async_sess_t *sess, serial_t **rserial)
+errno_t serial_open(async_sess_t *sess, serial_t **rserial)
 {
 	serial_t *serial;
@@ -68,10 +68,10 @@
 
 /** Set serial port communication properties. */
-int serial_set_comm_props(serial_t *serial, unsigned rate,
+errno_t serial_set_comm_props(serial_t *serial, unsigned rate,
     serial_parity_t parity, unsigned datab, unsigned stopb)
 {
 	async_exch_t *exch = async_exchange_begin(serial->sess);
 
-	int rc = async_req_4_0(exch, SERIAL_SET_COM_PROPS, rate, parity,
+	errno_t rc = async_req_4_0(exch, SERIAL_SET_COM_PROPS, rate, parity,
 	    datab, stopb);
 
@@ -81,5 +81,5 @@
 
 /** Get serial port communication properties. */
-int serial_get_comm_props(serial_t *serial, unsigned *rrate,
+errno_t serial_get_comm_props(serial_t *serial, unsigned *rrate,
     serial_parity_t *rparity, unsigned *rdatab, unsigned *rstopb)
 {
@@ -87,5 +87,5 @@
 	sysarg_t rate, parity, datab, stopb;
 
-	int rc = async_req_0_4(exch, SERIAL_GET_COM_PROPS, &rate, &parity,
+	errno_t rc = async_req_0_4(exch, SERIAL_GET_COM_PROPS, &rate, &parity,
 	    &datab, &stopb);
 
Index: uspace/lib/c/generic/io/table.c
===================================================================
--- uspace/lib/c/generic/io/table.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/table.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -51,5 +51,5 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-static int table_add_row(table_t *table, table_row_t **rrow)
+static errno_t table_add_row(table_t *table, table_row_t **rrow)
 {
 	table_row_t *row;
@@ -74,5 +74,5 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-static int table_row_add_cell(table_row_t *row, table_cell_t **rcell)
+static errno_t table_row_add_cell(table_row_t *row, table_cell_t **rcell)
 {
 	table_cell_t *cell;
@@ -99,5 +99,5 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-static int table_add_column(table_t *table, table_column_t **rcolumn)
+static errno_t table_add_column(table_t *table, table_column_t **rcolumn)
 {
 	table_column_t *column;
@@ -121,7 +121,7 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-static int table_write_next_cell(table_t *table)
-{
-	int rc;
+static errno_t table_write_next_cell(table_t *table)
+{
+	errno_t rc;
 
 	rc = table_row_add_cell(table->wrow, &table->wcell);
@@ -155,7 +155,7 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-static int table_write_next_row(table_t *table)
-{
-	int rc;
+static errno_t table_write_next_row(table_t *table)
+{
+	errno_t rc;
 
 	rc = table_add_row(table, &table->wrow);
@@ -272,5 +272,5 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-static int table_cell_extend(table_cell_t *cell, const char *str, size_t len)
+static errno_t table_cell_extend(table_cell_t *cell, const char *str, size_t len)
 {
 	char *cstr;
@@ -298,8 +298,8 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-int table_create(table_t **rtable)
+errno_t table_create(table_t **rtable)
 {
 	table_t *table;
-	int rc;
+	errno_t rc;
 
 	table = calloc(1, sizeof(table_t));
@@ -377,5 +377,5 @@
  * @return EOK on success, EIO on I/O error
  */
-int table_print_out(table_t *table, FILE *f)
+errno_t table_print_out(table_t *table, FILE *f)
 {
 	table_row_t *row;
@@ -474,8 +474,8 @@
  * @return EOK on success, ENOMEM if out of memory
  */
-int table_printf(table_t *table, const char *fmt, ...)
+errno_t table_printf(table_t *table, const char *fmt, ...)
 {
 	va_list args;
-	int rc;
+	errno_t rc;
 	int ret;
 	char *str;
@@ -548,5 +548,5 @@
  * @return EOK if no error indicated, non-zero error code otherwise
  */
-int table_get_error(table_t *table)
+errno_t table_get_error(table_t *table)
 {
 	return table->error;
Index: uspace/lib/c/generic/io/visualizer.c
===================================================================
--- uspace/lib/c/generic/io/visualizer.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/visualizer.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -39,23 +39,23 @@
 #include <io/visualizer.h>
 
-int visualizer_claim(async_sess_t *sess, sysarg_t notif_callback_id)
-{
-	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_1_0(exch, VISUALIZER_CLAIM, notif_callback_id);
-	async_exchange_end(exch);
-
-	return ret;
-}
-
-int visualizer_yield(async_sess_t *sess)
-{
-	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, VISUALIZER_YIELD);
-	async_exchange_end(exch);
-
-	return ret;
-}
-
-int visualizer_enumerate_modes(async_sess_t *sess, vslmode_t *mode, sysarg_t nth)
+errno_t visualizer_claim(async_sess_t *sess, sysarg_t notif_callback_id)
+{
+	async_exch_t *exch = async_exchange_begin(sess);
+	errno_t ret = async_req_1_0(exch, VISUALIZER_CLAIM, notif_callback_id);
+	async_exchange_end(exch);
+
+	return ret;
+}
+
+errno_t visualizer_yield(async_sess_t *sess)
+{
+	async_exch_t *exch = async_exchange_begin(sess);
+	errno_t ret = async_req_0_0(exch, VISUALIZER_YIELD);
+	async_exchange_end(exch);
+
+	return ret;
+}
+
+errno_t visualizer_enumerate_modes(async_sess_t *sess, vslmode_t *mode, sysarg_t nth)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -64,21 +64,21 @@
 	aid_t req = async_send_1(exch, VISUALIZER_ENUMERATE_MODES, nth, &answer);
 
-	int rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
-
-	async_exchange_end(exch);
-
-	int ret;
-	async_wait_for(req, &ret);
-
-	if (rc != EOK) {
-		return rc;
-	} else if (ret != EOK) {
-		return ret;
-	} else {
-		return EOK;
-	}
-}
-
-int visualizer_get_default_mode(async_sess_t *sess, vslmode_t *mode)
+	errno_t rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
+
+	async_exchange_end(exch);
+
+	errno_t ret;
+	async_wait_for(req, &ret);
+
+	if (rc != EOK) {
+		return rc;
+	} else if (ret != EOK) {
+		return ret;
+	} else {
+		return EOK;
+	}
+}
+
+errno_t visualizer_get_default_mode(async_sess_t *sess, vslmode_t *mode)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -87,21 +87,21 @@
 	aid_t req = async_send_0(exch, VISUALIZER_GET_DEFAULT_MODE, &answer);
 
-	int rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
-
-	async_exchange_end(exch);
-
-	int ret;
-	async_wait_for(req, &ret);
-
-	if (rc != EOK) {
-		return rc;
-	} else if (ret != EOK) {
-		return ret;
-	} else {
-		return EOK;
-	}
-}
-
-int visualizer_get_current_mode(async_sess_t *sess, vslmode_t *mode)
+	errno_t rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
+
+	async_exchange_end(exch);
+
+	errno_t ret;
+	async_wait_for(req, &ret);
+
+	if (rc != EOK) {
+		return rc;
+	} else if (ret != EOK) {
+		return ret;
+	} else {
+		return EOK;
+	}
+}
+
+errno_t visualizer_get_current_mode(async_sess_t *sess, vslmode_t *mode)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -110,21 +110,21 @@
 	aid_t req = async_send_0(exch, VISUALIZER_GET_CURRENT_MODE, &answer);
 
-	int rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
-
-	async_exchange_end(exch);
-
-	int ret;
-	async_wait_for(req, &ret);
-
-	if (rc != EOK) {
-		return rc;
-	} else if (ret != EOK) {
-		return ret;
-	} else {
-		return EOK;
-	}
-}
-
-int visualizer_get_mode(async_sess_t *sess, vslmode_t *mode, sysarg_t index)
+	errno_t rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
+
+	async_exchange_end(exch);
+
+	errno_t ret;
+	async_wait_for(req, &ret);
+
+	if (rc != EOK) {
+		return rc;
+	} else if (ret != EOK) {
+		return ret;
+	} else {
+		return EOK;
+	}
+}
+
+errno_t visualizer_get_mode(async_sess_t *sess, vslmode_t *mode, sysarg_t index)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -133,21 +133,21 @@
 	aid_t req = async_send_1(exch, VISUALIZER_GET_MODE, index, &answer);
 
-	int rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
-
-	async_exchange_end(exch);
-
-	int ret;
-	async_wait_for(req, &ret);
-
-	if (rc != EOK) {
-		return rc;
-	} else if (ret != EOK) {
-		return ret;
-	} else {
-		return EOK;
-	}
-}
-
-int visualizer_set_mode(async_sess_t *sess, sysarg_t index, sysarg_t version, void *cells)
+	errno_t rc = async_data_read_start(exch, mode, sizeof(vslmode_t));
+
+	async_exchange_end(exch);
+
+	errno_t ret;
+	async_wait_for(req, &ret);
+
+	if (rc != EOK) {
+		return rc;
+	} else if (ret != EOK) {
+		return ret;
+	} else {
+		return EOK;
+	}
+}
+
+errno_t visualizer_set_mode(async_sess_t *sess, sysarg_t index, sysarg_t version, void *cells)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -156,21 +156,21 @@
 	aid_t req = async_send_2(exch, VISUALIZER_SET_MODE, index, version, &answer);
 
-	int rc = async_share_out_start(exch, cells, AS_AREA_READ | AS_AREA_CACHEABLE);
-
-	async_exchange_end(exch);
-
-	int ret;
-	async_wait_for(req, &ret);
-
-	if (rc != EOK) {
-		return rc;
-	} else if (ret != EOK) {
-		return ret;
-	} else {
-		return EOK;
-	}
-}
-
-int visualizer_update_damaged_region(async_sess_t *sess,
+	errno_t rc = async_share_out_start(exch, cells, AS_AREA_READ | AS_AREA_CACHEABLE);
+
+	async_exchange_end(exch);
+
+	errno_t ret;
+	async_wait_for(req, &ret);
+
+	if (rc != EOK) {
+		return rc;
+	} else if (ret != EOK) {
+		return ret;
+	} else {
+		return EOK;
+	}
+}
+
+errno_t visualizer_update_damaged_region(async_sess_t *sess,
     sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height,
 	sysarg_t x_offset, sysarg_t y_offset)
@@ -182,5 +182,5 @@
 
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_5_0(exch, VISUALIZER_UPDATE_DAMAGED_REGION,
+	errno_t ret = async_req_5_0(exch, VISUALIZER_UPDATE_DAMAGED_REGION,
 	    x, y, width, height, offsets);
 	async_exchange_end(exch);
@@ -189,17 +189,17 @@
 }
 
-int visualizer_suspend(async_sess_t *sess)
-{
-	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, VISUALIZER_SUSPEND);
-	async_exchange_end(exch);
-
-	return ret;
-}
-
-int visualizer_wakeup(async_sess_t *sess)
-{
-	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, VISUALIZER_WAKE_UP);
+errno_t visualizer_suspend(async_sess_t *sess)
+{
+	async_exch_t *exch = async_exchange_begin(sess);
+	errno_t ret = async_req_0_0(exch, VISUALIZER_SUSPEND);
+	async_exchange_end(exch);
+
+	return ret;
+}
+
+errno_t visualizer_wakeup(async_sess_t *sess)
+{
+	async_exch_t *exch = async_exchange_begin(sess);
+	errno_t ret = async_req_0_0(exch, VISUALIZER_WAKE_UP);
 	async_exchange_end(exch);
 
Index: uspace/lib/c/generic/io/window.c
===================================================================
--- uspace/lib/c/generic/io/window.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/io/window.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -40,9 +40,9 @@
 #include <stdio.h>
 
-int win_register(async_sess_t *sess, window_flags_t flags, service_id_t *in,
+errno_t win_register(async_sess_t *sess, window_flags_t flags, service_id_t *in,
     service_id_t *out)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_1_2(exch, WINDOW_REGISTER, flags, in, out);
+	errno_t ret = async_req_1_2(exch, WINDOW_REGISTER, flags, in, out);
 	async_exchange_end(exch);
 	
@@ -50,5 +50,5 @@
 }
 
-int win_get_event(async_sess_t *sess, window_event_t *event)
+errno_t win_get_event(async_sess_t *sess, window_event_t *event)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
@@ -57,9 +57,9 @@
 	aid_t req = async_send_0(exch, WINDOW_GET_EVENT, &answer);
 
-	int rc = async_data_read_start(exch, event, sizeof(window_event_t));
+	errno_t rc = async_data_read_start(exch, event, sizeof(window_event_t));
 
 	async_exchange_end(exch);
 
-	int ret;
+	errno_t ret;
 	async_wait_for(req, &ret);
 
@@ -73,9 +73,9 @@
 }
 
-int win_damage(async_sess_t *sess,
+errno_t win_damage(async_sess_t *sess,
     sysarg_t x, sysarg_t y, sysarg_t width, sysarg_t height)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_4_0(exch, WINDOW_DAMAGE, x, y, width, height);
+	errno_t ret = async_req_4_0(exch, WINDOW_DAMAGE, x, y, width, height);
 	async_exchange_end(exch);
 
@@ -83,8 +83,8 @@
 }
 
-int win_grab(async_sess_t *sess, sysarg_t pos_id, sysarg_t grab_flags)
+errno_t win_grab(async_sess_t *sess, sysarg_t pos_id, sysarg_t grab_flags)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_2_0(exch, WINDOW_GRAB, pos_id, grab_flags);
+	errno_t ret = async_req_2_0(exch, WINDOW_GRAB, pos_id, grab_flags);
 	async_exchange_end(exch);
 
@@ -92,5 +92,5 @@
 }
 
-int win_resize(async_sess_t *sess, sysarg_t x, sysarg_t y, sysarg_t width,
+errno_t win_resize(async_sess_t *sess, sysarg_t x, sysarg_t y, sysarg_t width,
     sysarg_t height, window_placement_flags_t placement_flags, void *cells)
 {
@@ -101,9 +101,9 @@
 	    (sysarg_t) placement_flags, &answer);
 	
-	int rc = async_share_out_start(exch, cells, AS_AREA_READ | AS_AREA_CACHEABLE);
+	errno_t rc = async_share_out_start(exch, cells, AS_AREA_READ | AS_AREA_CACHEABLE);
 	
 	async_exchange_end(exch);
 	
-	int ret;
+	errno_t ret;
 	async_wait_for(req, &ret);
 	
@@ -116,8 +116,8 @@
 }
 
-int win_close(async_sess_t *sess)
+errno_t win_close(async_sess_t *sess)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, WINDOW_CLOSE);
+	errno_t ret = async_req_0_0(exch, WINDOW_CLOSE);
 	async_exchange_end(exch);
 
@@ -125,8 +125,8 @@
 }
 
-int win_close_request(async_sess_t *sess)
+errno_t win_close_request(async_sess_t *sess)
 {
 	async_exch_t *exch = async_exchange_begin(sess);
-	int ret = async_req_0_0(exch, WINDOW_CLOSE_REQUEST);
+	errno_t ret = async_req_0_0(exch, WINDOW_CLOSE_REQUEST);
 	async_exchange_end(exch);
 
