Index: uspace/lib/c/generic/devman.c
===================================================================
--- uspace/lib/c/generic/devman.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/c/generic/devman.c	(revision 847844a5c1c6014e479cb00bf10c9d740927aa2d)
@@ -176,5 +176,5 @@
 
 /** Register running driver with device manager. */
-int devman_driver_register(const char *name)
+errno_t devman_driver_register(const char *name)
 {
 	async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
@@ -182,5 +182,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_2(exch, DEVMAN_DRIVER_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));
 	
 	devman_exchange_end(exch);
@@ -213,5 +213,5 @@
  *
  */
-int devman_add_function(const char *name, fun_type_t ftype,
+errno_t devman_add_function(const char *name, fun_type_t ftype,
     match_id_list_t *match_ids, devman_handle_t devh, devman_handle_t *funh)
 {
@@ -222,5 +222,5 @@
 	aid_t req = async_send_3(exch, DEVMAN_ADD_FUNCTION, (sysarg_t) ftype,
 	    devh, match_count, &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) {
 		devman_exchange_end(exch);
@@ -264,5 +264,5 @@
 }
 
-int devman_add_device_to_category(devman_handle_t devman_handle,
+errno_t devman_add_device_to_category(devman_handle_t devman_handle,
     const char *cat_name)
 {
@@ -272,5 +272,5 @@
 	aid_t req = async_send_1(exch, DEVMAN_ADD_DEVICE_TO_CATEGORY,
 	    devman_handle, &answer);
-	int retval = async_data_write_start(exch, cat_name,
+	errno_t retval = async_data_write_start(exch, cat_name,
 	    str_size(cat_name));
 	
@@ -307,8 +307,8 @@
  * @return EOK on success or an error code.
  */
-int devman_remove_function(devman_handle_t funh)
+errno_t devman_remove_function(devman_handle_t funh)
 {
 	async_exch_t *exch;
-	int retval;
+	errno_t retval;
 	
 	exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
@@ -319,5 +319,5 @@
 }
 
-int devman_drv_fun_online(devman_handle_t funh)
+errno_t devman_drv_fun_online(devman_handle_t funh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
@@ -325,11 +325,11 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_0(exch, DEVMAN_DRV_FUN_ONLINE, funh);
-	
-	devman_exchange_end(exch);
-	return retval;
-}
-
-int devman_drv_fun_offline(devman_handle_t funh)
+	errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_ONLINE, funh);
+	
+	devman_exchange_end(exch);
+	return retval;
+}
+
+errno_t devman_drv_fun_offline(devman_handle_t funh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
@@ -337,5 +337,5 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_0(exch, DEVMAN_DRV_FUN_OFFLINE, funh);
+	errno_t retval = async_req_1_0(exch, DEVMAN_DRV_FUN_OFFLINE, funh);
 	
 	devman_exchange_end(exch);
@@ -358,5 +358,5 @@
 }
 
-int devman_fun_get_handle(const char *pathname, devman_handle_t *handle,
+errno_t devman_fun_get_handle(const char *pathname, devman_handle_t *handle,
     unsigned int flags)
 {
@@ -374,5 +374,5 @@
 	aid_t req = async_send_2(exch, DEVMAN_DEVICE_GET_HANDLE, flags, 0,
 	    &answer);
-	int retval = async_data_write_start(exch, pathname,
+	errno_t retval = async_data_write_start(exch, pathname,
 	    str_size(pathname));
 	
@@ -399,5 +399,5 @@
 }
 
-static int devman_get_str_internal(sysarg_t method, sysarg_t arg1,
+static errno_t devman_get_str_internal(sysarg_t method, sysarg_t arg1,
     sysarg_t arg2, sysarg_t *r1, char *buf, size_t buf_size)
 {
@@ -405,5 +405,5 @@
 	ipc_call_t dreply;
 	size_t act_size;
-	int dretval;
+	errno_t dretval;
 	
 	exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
@@ -421,5 +421,5 @@
 	}
 	
-	int retval;
+	errno_t retval;
 	async_wait_for(req, &retval);
 	
@@ -437,5 +437,5 @@
 }
 
-int devman_fun_get_path(devman_handle_t handle, char *buf, size_t buf_size)
+errno_t devman_fun_get_path(devman_handle_t handle, char *buf, size_t buf_size)
 {
 	return devman_get_str_internal(DEVMAN_FUN_GET_PATH, handle, 0, NULL,
@@ -443,8 +443,8 @@
 }
 
-int devman_fun_get_match_id(devman_handle_t handle, size_t index, char *buf,
+errno_t devman_fun_get_match_id(devman_handle_t handle, size_t index, char *buf,
     size_t buf_size, unsigned int *rscore)
 {
-	int rc;
+	errno_t rc;
 	sysarg_t score = 0;
 
@@ -458,5 +458,5 @@
 }
 
-int devman_fun_get_name(devman_handle_t handle, char *buf, size_t buf_size)
+errno_t devman_fun_get_name(devman_handle_t handle, char *buf, size_t buf_size)
 {
 	return devman_get_str_internal(DEVMAN_FUN_GET_NAME, handle, 0, NULL,
@@ -464,5 +464,5 @@
 }
 
-int devman_fun_get_driver_name(devman_handle_t handle, char *buf, size_t buf_size)
+errno_t devman_fun_get_driver_name(devman_handle_t handle, char *buf, size_t buf_size)
 {
 	return devman_get_str_internal(DEVMAN_FUN_GET_DRIVER_NAME, handle, 0,
@@ -470,5 +470,5 @@
 }
 
-int devman_fun_online(devman_handle_t funh)
+errno_t devman_fun_online(devman_handle_t funh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -476,11 +476,11 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_0(exch, DEVMAN_FUN_ONLINE, funh);
-	
-	devman_exchange_end(exch);
-	return retval;
-}
-
-int devman_fun_offline(devman_handle_t funh)
+	errno_t retval = async_req_1_0(exch, DEVMAN_FUN_ONLINE, funh);
+	
+	devman_exchange_end(exch);
+	return retval;
+}
+
+errno_t devman_fun_offline(devman_handle_t funh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -488,11 +488,11 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_0(exch, DEVMAN_FUN_OFFLINE, funh);
-	
-	devman_exchange_end(exch);
-	return retval;
-}
-
-static int devman_get_handles_once(sysarg_t method, sysarg_t arg1,
+	errno_t retval = async_req_1_0(exch, DEVMAN_FUN_OFFLINE, funh);
+	
+	devman_exchange_end(exch);
+	return retval;
+}
+
+static errno_t devman_get_handles_once(sysarg_t method, sysarg_t arg1,
     devman_handle_t *handle_buf, size_t buf_size, size_t *act_size)
 {
@@ -501,5 +501,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_1(exch, method, arg1, &answer);
-	int rc = async_data_read_start(exch, handle_buf, buf_size);
+	errno_t rc = async_data_read_start(exch, handle_buf, buf_size);
 	
 	devman_exchange_end(exch);
@@ -510,5 +510,5 @@
 	}
 	
-	int retval;
+	errno_t retval;
 	async_wait_for(req, &retval);
 	
@@ -531,5 +531,5 @@
  * @return 		EOK on success or an error code
  */
-static int devman_get_handles_internal(sysarg_t method, sysarg_t arg1,
+static errno_t devman_get_handles_internal(sysarg_t method, sysarg_t arg1,
     devman_handle_t **data, size_t *count)
 {
@@ -537,5 +537,5 @@
 	size_t act_size;
 	size_t alloc_size;
-	int rc;
+	errno_t rc;
 
 	*data = NULL;
@@ -574,5 +574,5 @@
 }
 
-int devman_fun_get_child(devman_handle_t funh, devman_handle_t *devh)
+errno_t devman_fun_get_child(devman_handle_t funh, devman_handle_t *devh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -580,5 +580,5 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_1(exch, DEVMAN_FUN_GET_CHILD,
+	errno_t retval = async_req_1_1(exch, DEVMAN_FUN_GET_CHILD,
 	    funh, devh);
 	
@@ -587,5 +587,5 @@
 }
 
-int devman_dev_get_functions(devman_handle_t devh, devman_handle_t **funcs,
+errno_t devman_dev_get_functions(devman_handle_t devh, devman_handle_t **funcs,
     size_t *count)
 {
@@ -594,5 +594,5 @@
 }
 
-int devman_dev_get_parent(devman_handle_t devh, devman_handle_t *funh)
+errno_t devman_dev_get_parent(devman_handle_t devh, devman_handle_t *funh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -600,5 +600,5 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_1(exch, DEVMAN_DEV_GET_PARENT,
+	errno_t retval = async_req_1_1(exch, DEVMAN_DEV_GET_PARENT,
 	    devh, funh);
 	
@@ -607,5 +607,5 @@
 }
 
-int devman_fun_sid_to_handle(service_id_t sid, devman_handle_t *handle)
+errno_t devman_fun_sid_to_handle(service_id_t sid, devman_handle_t *handle)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -613,5 +613,5 @@
 		return ENOMEM;
 	
-	int retval = async_req_1_1(exch, DEVMAN_FUN_SID_TO_HANDLE,
+	errno_t retval = async_req_1_1(exch, DEVMAN_FUN_SID_TO_HANDLE,
 	    sid, handle);
 	
@@ -620,5 +620,5 @@
 }
 
-int devman_get_drivers(devman_handle_t **drvs,
+errno_t devman_get_drivers(devman_handle_t **drvs,
     size_t *count)
 {
@@ -626,5 +626,5 @@
 }
 
-int devman_driver_get_devices(devman_handle_t drvh, devman_handle_t **devs,
+errno_t devman_driver_get_devices(devman_handle_t drvh, devman_handle_t **devs,
     size_t *count)
 {
@@ -633,5 +633,5 @@
 }
 
-int devman_driver_get_handle(const char *drvname, devman_handle_t *handle)
+errno_t devman_driver_get_handle(const char *drvname, devman_handle_t *handle)
 {
 	async_exch_t *exch;
@@ -643,5 +643,5 @@
 	ipc_call_t answer;
 	aid_t req = async_send_0(exch, DEVMAN_DRIVER_GET_HANDLE, &answer);
-	int retval = async_data_write_start(exch, drvname,
+	errno_t retval = async_data_write_start(exch, drvname,
 	    str_size(drvname));
 	
@@ -668,8 +668,8 @@
 }
 
-int devman_driver_get_match_id(devman_handle_t handle, size_t index, char *buf,
+errno_t devman_driver_get_match_id(devman_handle_t handle, size_t index, char *buf,
     size_t buf_size, unsigned int *rscore)
 {
-	int rc;
+	errno_t rc;
 	sysarg_t score = 0;
 
@@ -683,5 +683,5 @@
 }
 
-int devman_driver_get_name(devman_handle_t handle, char *buf, size_t buf_size)
+errno_t devman_driver_get_name(devman_handle_t handle, char *buf, size_t buf_size)
 {
 	return devman_get_str_internal(DEVMAN_DRIVER_GET_NAME, handle, 0, NULL,
@@ -689,5 +689,5 @@
 }
 
-int devman_driver_get_state(devman_handle_t drvh, driver_state_t *rstate)
+errno_t devman_driver_get_state(devman_handle_t drvh, driver_state_t *rstate)
 {
 	sysarg_t state;
@@ -696,5 +696,5 @@
 		return ENOMEM;
 	
-	int rc = async_req_1_1(exch, DEVMAN_DRIVER_GET_STATE, drvh,
+	errno_t rc = async_req_1_1(exch, DEVMAN_DRIVER_GET_STATE, drvh,
 	    &state);
 	
@@ -707,5 +707,5 @@
 }
 
-int devman_driver_load(devman_handle_t drvh)
+errno_t devman_driver_load(devman_handle_t drvh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -713,5 +713,5 @@
 		return ENOMEM;
 	
-	int rc = async_req_1_0(exch, DEVMAN_DRIVER_LOAD, drvh);
+	errno_t rc = async_req_1_0(exch, DEVMAN_DRIVER_LOAD, drvh);
 	
 	devman_exchange_end(exch);
@@ -719,5 +719,5 @@
 }
 
-int devman_driver_unload(devman_handle_t drvh)
+errno_t devman_driver_unload(devman_handle_t drvh)
 {
 	async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
@@ -725,5 +725,5 @@
 		return ENOMEM;
 	
-	int rc = async_req_1_0(exch, DEVMAN_DRIVER_UNLOAD, drvh);
+	errno_t rc = async_req_1_0(exch, DEVMAN_DRIVER_UNLOAD, drvh);
 	
 	devman_exchange_end(exch);
