Index: uspace/lib/hound/include/hound/client.h
===================================================================
--- uspace/lib/hound/include/hound/client.h	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/hound/include/hound/client.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -53,14 +53,14 @@
 void hound_context_destroy(hound_context_t *hound);
 
-int hound_context_set_main_stream_params(hound_context_t *hound,
+errno_t hound_context_set_main_stream_params(hound_context_t *hound,
     pcm_format_t format, size_t bsize);
 
-int hound_context_get_available_targets(hound_context_t *hound,
+errno_t hound_context_get_available_targets(hound_context_t *hound,
     const char ***names, size_t *count);
-int hound_context_get_connected_targets(hound_context_t *hound,
+errno_t hound_context_get_connected_targets(hound_context_t *hound,
     const char ***names, size_t *count);
 
-int hound_context_connect_target(hound_context_t *hound, const char* target);
-int hound_context_disconnect_target(hound_context_t *hound, const char* target);
+errno_t hound_context_connect_target(hound_context_t *hound, const char* target);
+errno_t hound_context_disconnect_target(hound_context_t *hound, const char* target);
 
 hound_stream_t *hound_stream_create(hound_context_t *hound, unsigned flags,
@@ -68,14 +68,14 @@
 void hound_stream_destroy(hound_stream_t *stream);
 
-int hound_stream_write(hound_stream_t *stream, const void *data, size_t size);
-int hound_stream_read(hound_stream_t *stream, void *data, size_t size);
-int hound_stream_drain(hound_stream_t *stream);
+errno_t hound_stream_write(hound_stream_t *stream, const void *data, size_t size);
+errno_t hound_stream_read(hound_stream_t *stream, void *data, size_t size);
+errno_t hound_stream_drain(hound_stream_t *stream);
 
-int hound_write_main_stream(hound_context_t *hound,
+errno_t hound_write_main_stream(hound_context_t *hound,
     const void *data, size_t size);
-int hound_read_main_stream(hound_context_t *hound, void *data, size_t size);
-int hound_write_replace_main_stream(hound_context_t *hound,
+errno_t hound_read_main_stream(hound_context_t *hound, void *data, size_t size);
+errno_t hound_write_replace_main_stream(hound_context_t *hound,
     const void *data, size_t size);
-int hound_write_immediate(hound_context_t *hound,
+errno_t hound_write_immediate(hound_context_t *hound,
     pcm_format_t format, const void *data, size_t size);
 
Index: uspace/lib/hound/include/hound/protocol.h
===================================================================
--- uspace/lib/hound/include/hound/protocol.h	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/hound/include/hound/protocol.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -61,9 +61,9 @@
 void hound_service_disconnect(hound_sess_t *sess);
 
-int hound_service_register_context(hound_sess_t *sess,
+errno_t hound_service_register_context(hound_sess_t *sess,
     const char *name, bool record, hound_context_id_t *id);
-int hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id);
+errno_t hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id);
 
-int hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
+errno_t hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
     int flags, const char *connection);
 
@@ -76,5 +76,5 @@
  * @return Error code.
  */
-static inline int hound_service_get_list_all(hound_sess_t *sess,
+static inline errno_t hound_service_get_list_all(hound_sess_t *sess,
     const char ***ids, size_t *count, int flags)
 {
@@ -82,16 +82,16 @@
 }
 
-int hound_service_connect_source_sink(hound_sess_t *sess, const char *source,
+errno_t hound_service_connect_source_sink(hound_sess_t *sess, const char *source,
     const char *sink);
-int hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source,
+errno_t hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source,
     const char *sink);
 
-int hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,
+errno_t hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,
     int flags, pcm_format_t format, size_t bsize);
-int hound_service_stream_drain(async_exch_t *exch);
-int hound_service_stream_exit(async_exch_t *exch);
+errno_t hound_service_stream_drain(async_exch_t *exch);
+errno_t hound_service_stream_exit(async_exch_t *exch);
 
-int hound_service_stream_write(async_exch_t *exch, const void *data, size_t size);
-int hound_service_stream_read(async_exch_t *exch, void *data, size_t size);
+errno_t hound_service_stream_write(async_exch_t *exch, const void *data, size_t size);
+errno_t hound_service_stream_read(async_exch_t *exch, void *data, size_t size);
 
 /* Server */
@@ -100,26 +100,26 @@
 typedef struct hound_server_iface {
 	/** Create new context */
-	int (*add_context)(void *, hound_context_id_t *, const char *, bool);
+	errno_t (*add_context)(void *, hound_context_id_t *, const char *, bool);
 	/** Destroy existing context */
-	int (*rem_context)(void *, hound_context_id_t);
+	errno_t (*rem_context)(void *, hound_context_id_t);
 	/** Query context direction */
 	bool (*is_record_context)(void *, hound_context_id_t);
 	/** Get string identifiers of specified objects */
-	int (*get_list)(void *, const char ***, size_t *, const char *, int);
+	errno_t (*get_list)(void *, const char ***, size_t *, const char *, int);
 	/** Create connection between source and sink */
-	int (*connect)(void *, const char *, const char *);
+	errno_t (*connect)(void *, const char *, const char *);
 	/** Destroy connection between source and sink */
-	int (*disconnect)(void *, const char *, const char *);
+	errno_t (*disconnect)(void *, const char *, const char *);
 	/** Create new stream tied to the context */
-	int (*add_stream)(void *, hound_context_id_t, int, pcm_format_t, size_t,
+	errno_t (*add_stream)(void *, hound_context_id_t, int, pcm_format_t, size_t,
 	    void **);
 	/** Destroy existing stream */
-	int (*rem_stream)(void *, void *);
+	errno_t (*rem_stream)(void *, void *);
 	/** Block until the stream buffer is empty */
-	int (*drain_stream)(void *);
+	errno_t (*drain_stream)(void *);
 	/** Write new data to the stream */
-	int (*stream_data_write)(void *, const void *, size_t);
+	errno_t (*stream_data_write)(void *, const void *, size_t);
 	/** Read data from the stream */
-	int (*stream_data_read)(void *, void *, size_t);
+	errno_t (*stream_data_read)(void *, void *, size_t);
 	void *server;
 } hound_server_iface_t;
Index: uspace/lib/hound/include/hound/server.h
===================================================================
--- uspace/lib/hound/include/hound/server.h	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/hound/include/hound/server.h	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -41,10 +41,10 @@
 
 typedef void (*dev_change_callback_t)(void);
-typedef int (*device_callback_t)(service_id_t, const char *);
+typedef errno_t (*device_callback_t)(service_id_t, const char *);
 
-int hound_server_register(const char *name, service_id_t *id);
+errno_t hound_server_register(const char *name, service_id_t *id);
 void hound_server_unregister(service_id_t id);
-int hound_server_set_device_change_callback(dev_change_callback_t cb);
-int hound_server_devices_iterate(device_callback_t callback);
+errno_t hound_server_set_device_change_callback(dev_change_callback_t cb);
+errno_t hound_server_devices_iterate(device_callback_t callback);
 
 #endif
Index: uspace/lib/hound/src/client.c
===================================================================
--- uspace/lib/hound/src/client.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/hound/src/client.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -123,5 +123,5 @@
 			return NULL;
 		}
-		int rc = hound_service_register_context(
+		errno_t rc = hound_service_register_context(
 		    new_context->session, new_context->name, record,
 		    &new_context->id);
@@ -195,5 +195,5 @@
  * The function will return deice sinks or source based on the context type.
  */
-int hound_context_get_available_targets(hound_context_t *hound,
+errno_t hound_context_get_available_targets(hound_context_t *hound,
     const char ***names, size_t *count)
 {
@@ -212,5 +212,5 @@
  * @return Error code.
  */
-int hound_context_get_connected_targets(hound_context_t *hound,
+errno_t hound_context_get_connected_targets(hound_context_t *hound,
     const char ***names, size_t *count)
 {
@@ -232,5 +232,5 @@
  * connect to the first possible target if it is passed this value.
  */
-int hound_context_connect_target(hound_context_t *hound, const char* target)
+errno_t hound_context_connect_target(hound_context_t *hound, const char* target)
 {
 	assert(hound);
@@ -239,5 +239,5 @@
 	const char **tgt = NULL;
 	size_t count = 1;
-	int ret = EOK;
+	errno_t ret = EOK;
 	if (str_cmp(target, HOUND_DEFAULT_TARGET) == 0) {
 		ret = hound_context_get_available_targets(hound, &tgt, &count);
@@ -269,5 +269,5 @@
  * @return Error code.
  */
-int hound_context_disconnect_target(hound_context_t *hound, const char* target)
+errno_t hound_context_disconnect_target(hound_context_t *hound, const char* target)
 {
 	assert(hound);
@@ -305,5 +305,5 @@
 		new_stream->context = hound;
 		new_stream->flags = flags;
-		const int ret = hound_service_stream_enter(new_stream->exch,
+		const errno_t ret = hound_service_stream_enter(new_stream->exch,
 		    hound->id, flags, format, bsize);
 		if (ret != EOK) {
@@ -343,5 +343,5 @@
  * @return error code.
  */
-int hound_stream_write(hound_stream_t *stream, const void *data, size_t size)
+errno_t hound_stream_write(hound_stream_t *stream, const void *data, size_t size)
 {
 	assert(stream);
@@ -358,5 +358,5 @@
  * @return error code.
  */
-int hound_stream_read(hound_stream_t *stream, void *data, size_t size)
+errno_t hound_stream_read(hound_stream_t *stream, void *data, size_t size)
 {
 	assert(stream);
@@ -371,5 +371,5 @@
  * @return Error code.
  */
-int hound_stream_drain(hound_stream_t *stream)
+errno_t hound_stream_drain(hound_stream_t *stream)
 {
 	assert(stream);
@@ -402,5 +402,5 @@
  * @return error code.
  */
-int hound_write_main_stream(hound_context_t *hound,
+errno_t hound_write_main_stream(hound_context_t *hound,
     const void *data, size_t size)
 {
@@ -422,5 +422,5 @@
  * @return error code.
  */
-int hound_read_main_stream(hound_context_t *hound, void *data, size_t size)
+errno_t hound_read_main_stream(hound_context_t *hound, void *data, size_t size)
 {
 	assert(hound);
@@ -442,5 +442,5 @@
  * NOT IMPLEMENTED
  */
-int hound_write_replace_main_stream(hound_context_t *hound,
+errno_t hound_write_replace_main_stream(hound_context_t *hound,
     const void *data, size_t size)
 {
@@ -460,5 +460,5 @@
  * NOT IMPLEMENTED
  */
-int hound_context_set_main_stream_params(hound_context_t *hound,
+errno_t hound_context_set_main_stream_params(hound_context_t *hound,
     pcm_format_t format, size_t bsize)
 {
@@ -479,5 +479,5 @@
  * to drain and destroys it before returning.
  */
-int hound_write_immediate(hound_context_t *hound, pcm_format_t format,
+errno_t hound_write_immediate(hound_context_t *hound, pcm_format_t format,
     const void *data, size_t size)
 {
@@ -488,5 +488,5 @@
 	if (!tmpstream)
 		return ENOMEM;
-	const int ret = hound_stream_write(tmpstream, data, size);
+	const errno_t ret = hound_stream_write(tmpstream, data, size);
 	if (ret == EOK) {
 		//TODO drain?
Index: uspace/lib/hound/src/protocol.c
===================================================================
--- uspace/lib/hound/src/protocol.c	(revision 25a179efc4ecca45aa90793992b6c1c2743fd07f)
+++ uspace/lib/hound/src/protocol.c	(revision e211ea04fccf33d4cb2092f630a29e893e096a02)
@@ -93,5 +93,5 @@
 {
 	service_id_t id = 0;
-	const int ret =
+	const errno_t ret =
 	    loc_service_get_id(service, &id, IPC_FLAG_BLOCKING);
 	if (ret != EOK)
@@ -120,5 +120,5 @@
  * @return EOK on success, Error code on failure.
  */
-int hound_service_register_context(hound_sess_t *sess,
+errno_t hound_service_register_context(hound_sess_t *sess,
     const char *name, bool record, hound_context_id_t *id)
 {
@@ -129,5 +129,5 @@
 	aid_t mid =
 	    async_send_1(exch, IPC_M_HOUND_CONTEXT_REGISTER, record, &call);
-	int ret = mid ? EOK : EPARTY;
+	errno_t ret = mid ? EOK : EPARTY;
 
 	if (ret == EOK)
@@ -153,9 +153,9 @@
  * @return Error code.
  */
-int hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id)
+errno_t hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id)
 {
 	assert(sess);
 	async_exch_t *exch = async_exchange_begin(sess);
-	const int ret =
+	const errno_t ret =
 	    async_req_1_0(exch, IPC_M_HOUND_CONTEXT_UNREGISTER, id);
 	async_exchange_end(exch);
@@ -173,5 +173,5 @@
  * @retval Error code.
  */
-int hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
+errno_t hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
     int flags, const char *connection)
 {
@@ -191,5 +191,5 @@
 	    connection != NULL, &res_call);
 
-	int ret = EOK;
+	errno_t ret = EOK;
 	if (mid && connection)
 		ret = async_data_write_start(exch, connection,
@@ -247,5 +247,5 @@
  * @return Error code.
  */
-int hound_service_connect_source_sink(hound_sess_t *sess, const char *source,
+errno_t hound_service_connect_source_sink(hound_sess_t *sess, const char *source,
     const char *sink)
 {
@@ -259,5 +259,5 @@
 	ipc_call_t call;
 	aid_t id = async_send_0(exch, IPC_M_HOUND_CONNECT, &call);
-	int ret = id ? EOK : EPARTY;
+	errno_t ret = id ? EOK : EPARTY;
 	if (ret == EOK)
 		ret = async_data_write_start(exch, source, str_size(source));
@@ -276,5 +276,5 @@
  * @return Error code.
  */
-int hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source,
+errno_t hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source,
     const char *sink)
 {
@@ -285,5 +285,5 @@
 	ipc_call_t call;
 	aid_t id = async_send_0(exch, IPC_M_HOUND_DISCONNECT, &call);
-	int ret = id ? EOK : EPARTY;
+	errno_t ret = id ? EOK : EPARTY;
 	if (ret == EOK)
 		ret = async_data_write_start(exch, source, str_size(source));
@@ -304,5 +304,5 @@
  * @return Error code.
  */
-int hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,
+errno_t hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,
     int flags, pcm_format_t format, size_t bsize)
 {
@@ -321,5 +321,5 @@
  * @return Error code.
  */
-int hound_service_stream_exit(async_exch_t *exch)
+errno_t hound_service_stream_exit(async_exch_t *exch)
 {
 	return async_req_0_0(exch, IPC_M_HOUND_STREAM_EXIT);
@@ -331,5 +331,5 @@
  * @return Error code.
  */
-int hound_service_stream_drain(async_exch_t *exch)
+errno_t hound_service_stream_drain(async_exch_t *exch)
 {
 	return async_req_0_0(exch, IPC_M_HOUND_STREAM_DRAIN);
@@ -343,5 +343,5 @@
  * @return Error code.
  */
-int hound_service_stream_write(async_exch_t *exch, const void *data, size_t size)
+errno_t hound_service_stream_write(async_exch_t *exch, const void *data, size_t size)
 {
 	return async_data_write_start(exch, data, size);
@@ -355,5 +355,5 @@
  * @return Error code.
  */
-int hound_service_stream_read(async_exch_t *exch, void *data, size_t size)
+errno_t hound_service_stream_read(async_exch_t *exch, void *data, size_t size)
 {
 	return async_data_read_start(exch, data, size);
@@ -407,5 +407,5 @@
 
 			/* Get context name */
-			int ret =
+			errno_t ret =
 			    async_data_write_accept(&name, true, 0, 0, 0, 0);
 			if (ret != EOK) {
@@ -434,5 +434,5 @@
 			/* get id, 1st param */
 			hound_context_id_t id = IPC_GET_ARG1(call);
-			const int ret =
+			const errno_t ret =
 			    server_iface->rem_context(server_iface->server, id);
 			async_answer_0(callid, ret);
@@ -451,5 +451,5 @@
 			const bool conn = IPC_GET_ARG3(call);
 			char *conn_name = NULL;
-			int ret = EOK;
+			errno_t ret = EOK;
 
 			/* get connected actor name if provided */
@@ -513,5 +513,5 @@
 
 			/* read source name */
-			int ret =
+			errno_t ret =
 			    async_data_write_accept(&source, true, 0, 0, 0, 0);
 			/* read sink name */
@@ -539,5 +539,5 @@
 
 			/* read source name */
-			int ret =
+			errno_t ret =
 			    async_data_write_accept(&source, true, 0, 0, 0, 0);
 			/*read sink name */
@@ -574,5 +574,5 @@
 
 			void *stream;
-			int ret = server_iface->add_stream(server_iface->server,
+			errno_t ret = server_iface->add_stream(server_iface->server,
 			    id, flags, f, bsize, &stream);
 			if (ret != EOK) {
@@ -626,5 +626,5 @@
 	ipc_call_t call;
 	size_t size = 0;
-	int ret_answer = EOK;
+	errno_t ret_answer = EOK;
 	/* accept data write or drain */
 	while (async_data_write_receive_call(&callid, &call, &size)
@@ -632,5 +632,5 @@
 		/* check drain first */
 		if (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN) {
-			int ret = ENOTSUP;
+			errno_t ret = ENOTSUP;
 			if (server_iface->drain_stream)
 				ret = server_iface->drain_stream(stream);
@@ -650,5 +650,5 @@
 			continue;
 		}
-		const int ret = async_data_write_finalize(callid, buffer, size);
+		const errno_t ret = async_data_write_finalize(callid, buffer, size);
 		if (ret == EOK) {
 			/* push data to stream */
@@ -657,5 +657,5 @@
 		}
 	}
-	const int ret = IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_EXIT
+	const errno_t ret = IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_EXIT
 	    ? EOK : EINVAL;
 
@@ -673,5 +673,5 @@
 	ipc_call_t call;
 	size_t size = 0;
-	int ret_answer = EOK;
+	errno_t ret_answer = EOK;
 	/* accept data read and drain */
 	while (async_data_read_receive_call(&callid, &call, &size)
@@ -679,5 +679,5 @@
 		/* drain does not make much sense but it is allowed */
 		if (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN) {
-			int ret = ENOTSUP;
+			errno_t ret = ENOTSUP;
 			if (server_iface->drain_stream)
 				ret = server_iface->drain_stream(stream);
@@ -695,5 +695,5 @@
 			continue;
 		}
-		int ret = server_iface->stream_data_read(stream, buffer, size);
+		errno_t ret = server_iface->stream_data_read(stream, buffer, size);
 		if (ret == EOK) {
 			ret_answer =
@@ -701,5 +701,5 @@
 		}
 	}
-	const int ret = IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_EXIT
+	const errno_t ret = IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_EXIT
 	    ? EOK : EINVAL;
 
@@ -718,10 +718,10 @@
  * @return Error code.
  */
-int hound_server_register(const char *name, service_id_t *id)
+errno_t hound_server_register(const char *name, service_id_t *id)
 {
 	if (!name || !id)
 		return EINVAL;
 
-	int ret = loc_server_register(name);
+	errno_t ret = loc_server_register(name);
 	if (ret != EOK)
 		return ret;
@@ -744,5 +744,5 @@
  * @return Error code.
  */
-int hound_server_set_device_change_callback(dev_change_callback_t cb)
+errno_t hound_server_set_device_change_callback(dev_change_callback_t cb)
 {
 	return loc_register_cat_change_cb(cb);
@@ -754,5 +754,5 @@
  * @return Error code.
  */
-int hound_server_devices_iterate(device_callback_t callback)
+errno_t hound_server_devices_iterate(device_callback_t callback)
 {
 	if (!callback)
@@ -762,5 +762,5 @@
 
 	if (!resolved) {
-		const int ret = loc_category_get_id("audio-pcm", &cat_id,
+		const errno_t ret = loc_category_get_id("audio-pcm", &cat_id,
 		    IPC_FLAG_BLOCKING);
 		if (ret != EOK)
@@ -771,5 +771,5 @@
 	service_id_t *svcs = NULL;
 	size_t count = 0;
-	const int ret = loc_category_get_svcs(cat_id, &svcs, &count);
+	const errno_t ret = loc_category_get_svcs(cat_id, &svcs, &count);
 	if (ret != EOK)
 		return ret;
