Index: uspace/lib/c/generic/loc.c
===================================================================
--- uspace/lib/c/generic/loc.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/loc.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -103,5 +103,5 @@
  *
  */
-static int loc_callback_create(void)
+static errno_t loc_callback_create(void)
 {
 	if (!loc_callback_created) {
@@ -113,5 +113,5 @@
 		
 		port_id_t port;
-		int rc = async_create_callback_port(exch, INTERFACE_LOC_CB, 0, 0,
+		errno_t rc = async_create_callback_port(exch, INTERFACE_LOC_CB, 0, 0,
 		    loc_cb_conn, NULL, &port);
 		
@@ -121,5 +121,5 @@
 			return rc;
 		
-		int retval;
+		errno_t retval;
 		async_wait_for(req, &retval);
 		if (retval != EOK)
@@ -239,5 +239,5 @@
 
 /** Register new driver with loc. */
-int loc_server_register(const char *name)
+errno_t loc_server_register(const char *name)
 {
 	async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
@@ -245,5 +245,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_2(exch, LOC_SERVER_REGISTER, 0, 0, &answer);
-	int retval = async_data_write_start(exch, name, str_size(name));
+	errno_t retval = async_data_write_start(exch, name, str_size(name));
 	
 	if (retval != EOK) {
@@ -272,5 +272,5 @@
  *
  */
-int loc_service_register(const char *fqsn, service_id_t *sid)
+errno_t loc_service_register(const char *fqsn, service_id_t *sid)
 {
 	async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
@@ -278,5 +278,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, LOC_SERVICE_REGISTER, &answer);
-	int retval = async_data_write_start(exch, fqsn, str_size(fqsn));
+	errno_t retval = async_data_write_start(exch, fqsn, str_size(fqsn));
 	
 	if (retval != EOK) {
@@ -311,8 +311,8 @@
  * @param sid	Service ID
  */
-int loc_service_unregister(service_id_t sid)
+errno_t loc_service_unregister(service_id_t sid)
 {
 	async_exch_t *exch;
-	int retval;
+	errno_t retval;
 	
 	exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
@@ -320,8 +320,8 @@
 	loc_exchange_end(exch);
 	
-	return (int)retval;
-}
-
-int loc_service_get_id(const char *fqdn, service_id_t *handle,
+	return (errno_t)retval;
+}
+
+errno_t loc_service_get_id(const char *fqdn, service_id_t *handle,
     unsigned int flags)
 {
@@ -339,5 +339,5 @@
 	aid_t req = async_send_2(exch, LOC_SERVICE_GET_ID, flags, 0,
 	    &answer);
-	int retval = async_data_write_start(exch, fqdn, str_size(fqdn));
+	errno_t retval = async_data_write_start(exch, fqdn, str_size(fqdn));
 	
 	loc_exchange_end(exch);
@@ -373,5 +373,5 @@
  * @return		EOK on success or an error code
  */
-static int loc_get_name_internal(sysarg_t method, sysarg_t id, char **name)
+static errno_t loc_get_name_internal(sysarg_t method, sysarg_t id, char **name)
 {
 	async_exch_t *exch;
@@ -379,5 +379,5 @@
 	ipc_call_t dreply;
 	size_t act_size;
-	int dretval;
+	errno_t dretval;
 	
 	*name = NULL;
@@ -397,5 +397,5 @@
 	}
 	
-	int retval;
+	errno_t retval;
 	async_wait_for(req, &retval);
 	
@@ -423,5 +423,5 @@
  * @return		EOK on success or an error code
  */
-int loc_category_get_name(category_id_t cat_id, char **name)
+errno_t loc_category_get_name(category_id_t cat_id, char **name)
 {
 	return loc_get_name_internal(LOC_CATEGORY_GET_NAME, cat_id, name);
@@ -437,5 +437,5 @@
  * @return		EOK on success or an error code
  */
-int loc_service_get_name(service_id_t svc_id, char **name)
+errno_t loc_service_get_name(service_id_t svc_id, char **name)
 {
 	return loc_get_name_internal(LOC_SERVICE_GET_NAME, svc_id, name);
@@ -451,10 +451,10 @@
  * @return		EOK on success or an error code
  */
-int loc_service_get_server_name(service_id_t svc_id, char **name)
+errno_t loc_service_get_server_name(service_id_t svc_id, char **name)
 {
 	return loc_get_name_internal(LOC_SERVICE_GET_SERVER_NAME, svc_id, name);
 }
 
-int loc_namespace_get_id(const char *name, service_id_t *handle,
+errno_t loc_namespace_get_id(const char *name, service_id_t *handle,
     unsigned int flags)
 {
@@ -472,5 +472,5 @@
 	aid_t req = async_send_2(exch, LOC_NAMESPACE_GET_ID, flags, 0,
 	    &answer);
-	int retval = async_data_write_start(exch, name, str_size(name));
+	errno_t retval = async_data_write_start(exch, name, str_size(name));
 	
 	loc_exchange_end(exch);
@@ -505,5 +505,5 @@
  * @return		EOK on success or an error code
  */
-int loc_category_get_id(const char *name, category_id_t *cat_id,
+errno_t loc_category_get_id(const char *name, category_id_t *cat_id,
     unsigned int flags)
 {
@@ -521,5 +521,5 @@
 	aid_t req = async_send_0(exch, LOC_CATEGORY_GET_ID,
 	    &answer);
-	int retval = async_data_write_start(exch, name, str_size(name));
+	errno_t retval = async_data_write_start(exch, name, str_size(name));
 	
 	loc_exchange_end(exch);
@@ -551,5 +551,5 @@
 	
 	sysarg_t type;
-	int retval = async_req_1_1(exch, LOC_ID_PROBE, handle, &type);
+	errno_t retval = async_req_1_1(exch, LOC_ID_PROBE, handle, &type);
 	
 	loc_exchange_end(exch);
@@ -582,5 +582,5 @@
 	
 	sysarg_t null_id;
-	int retval = async_req_0_1(exch, LOC_NULL_CREATE, &null_id);
+	errno_t retval = async_req_0_1(exch, LOC_NULL_CREATE, &null_id);
 	
 	loc_exchange_end(exch);
@@ -602,5 +602,5 @@
 {
 	sysarg_t count;
-	int retval = async_req_0_1(exch, LOC_GET_NAMESPACE_COUNT, &count);
+	errno_t retval = async_req_0_1(exch, LOC_GET_NAMESPACE_COUNT, &count);
 	if (retval != EOK)
 		return 0;
@@ -615,8 +615,8 @@
  * @return		EOK on success or an error code
  */
-int loc_service_add_to_cat(service_id_t svc_id, service_id_t cat_id)
+errno_t loc_service_add_to_cat(service_id_t svc_id, service_id_t cat_id)
 {
 	async_exch_t *exch;
-	int retval;
+	errno_t retval;
 	
 	exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
@@ -631,5 +631,5 @@
 {
 	sysarg_t count;
-	int retval = async_req_1_1(exch, LOC_GET_SERVICE_COUNT, ns_handle,
+	errno_t retval = async_req_1_1(exch, LOC_GET_SERVICE_COUNT, ns_handle,
 	    &count);
 	if (retval != EOK)
@@ -676,5 +676,5 @@
 		ipc_call_t answer;
 		aid_t req = async_send_0(exch, LOC_GET_NAMESPACES, &answer);
-		int rc = async_data_read_start(exch, devs, count * sizeof(loc_sdesc_t));
+		errno_t rc = async_data_read_start(exch, devs, count * sizeof(loc_sdesc_t));
 		
 		loc_exchange_end(exch);
@@ -695,5 +695,5 @@
 		}
 		
-		int retval;
+		errno_t retval;
 		async_wait_for(req, &retval);
 		
@@ -725,5 +725,5 @@
 		ipc_call_t answer;
 		aid_t req = async_send_1(exch, LOC_GET_SERVICES, ns_handle, &answer);
-		int rc = async_data_read_start(exch, devs, count * sizeof(loc_sdesc_t));
+		errno_t rc = async_data_read_start(exch, devs, count * sizeof(loc_sdesc_t));
 		
 		loc_exchange_end(exch);
@@ -744,5 +744,5 @@
 		}
 		
-		int retval;
+		errno_t retval;
 		async_wait_for(req, &retval);
 		
@@ -755,5 +755,5 @@
 }
 
-static int loc_category_get_ids_once(sysarg_t method, sysarg_t arg1,
+static errno_t loc_category_get_ids_once(sysarg_t method, sysarg_t arg1,
     sysarg_t *id_buf, size_t buf_size, size_t *act_size)
 {
@@ -762,5 +762,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_1(exch, method, arg1, &answer);
-	int rc = async_data_read_start(exch, id_buf, buf_size);
+	errno_t rc = async_data_read_start(exch, id_buf, buf_size);
 	
 	loc_exchange_end(exch);
@@ -771,5 +771,5 @@
 	}
 	
-	int retval;
+	errno_t retval;
 	async_wait_for(req, &retval);
 	
@@ -792,5 +792,5 @@
  * @return 		EOK on success or an error code
  */
-static int loc_get_ids_internal(sysarg_t method, sysarg_t arg1,
+static errno_t loc_get_ids_internal(sysarg_t method, sysarg_t arg1,
     sysarg_t **data, size_t *count)
 {
@@ -799,5 +799,5 @@
 	
 	size_t act_size = 0;
-	int rc = loc_category_get_ids_once(method, arg1, NULL, 0,
+	errno_t rc = loc_category_get_ids_once(method, arg1, NULL, 0,
 	    &act_size);
 	if (rc != EOK)
@@ -838,5 +838,5 @@
  * @return 		EOK on success or an error code
  */
-int loc_category_get_svcs(category_id_t cat_id, service_id_t **data,
+errno_t loc_category_get_svcs(category_id_t cat_id, service_id_t **data,
     size_t *count)
 {
@@ -853,5 +853,5 @@
  * @return 		EOK on success or an error code
  */
-int loc_get_categories(category_id_t **data, size_t *count)
+errno_t loc_get_categories(category_id_t **data, size_t *count)
 {
 	return loc_get_ids_internal(LOC_GET_CATEGORIES, 0,
@@ -859,5 +859,5 @@
 }
 
-int loc_register_cat_change_cb(loc_cat_change_cb_t cb_fun)
+errno_t loc_register_cat_change_cb(loc_cat_change_cb_t cb_fun)
 {
 	fibril_mutex_lock(&loc_callback_mutex);
