Index: uspace/lib/nic/src/nic_impl.c
===================================================================
--- uspace/lib/nic/src/nic_impl.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/nic/src/nic_impl.c	(revision 58e4d85ce498861509fd56f58413b1cd38ab29f6)
@@ -52,5 +52,5 @@
  * @return EOK always.
  */
-int nic_get_state_impl(ddf_fun_t *fun, nic_device_state_t *state)
+errno_t nic_get_state_impl(ddf_fun_t *fun, nic_device_state_t *state)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -72,5 +72,5 @@
  * @return EINVAL	If the state cannot be changed
  */
-int nic_set_state_impl(ddf_fun_t *fun, nic_device_state_t state)
+errno_t nic_set_state_impl(ddf_fun_t *fun, nic_device_state_t state)
 {
 	if (state >= NIC_STATE_MAX) {
@@ -108,5 +108,5 @@
 	}
 	if (event_handler != NULL) {
-		int rc = event_handler(nic_data);
+		errno_t rc = event_handler(nic_data);
 		if (rc != EOK) {
 			fibril_rwlock_write_unlock(&nic_data->main_lock);
@@ -117,5 +117,5 @@
 	if (state == NIC_STATE_STOPPED) {
 		/* Notify upper layers that we are reseting the MAC */
-		int rc = nic_ev_addr_changed(nic_data->client_session,
+		errno_t rc = nic_ev_addr_changed(nic_data->client_session,
 			&nic_data->default_mac);
 		nic_data->poll_mode = nic_data->default_poll_mode;
@@ -168,5 +168,5 @@
  * @return EBUSY	If the device is not in state when the frame can be sent.
  */
-int nic_send_frame_impl(ddf_fun_t *fun, void *data, size_t size)
+errno_t nic_send_frame_impl(ddf_fun_t *fun, void *data, size_t size)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -191,5 +191,5 @@
  * @return EOK		On success, or an error code.
  */
-int nic_callback_create_impl(ddf_fun_t *fun)
+errno_t nic_callback_create_impl(ddf_fun_t *fun)
 {
 	nic_t *nic = nic_get_from_ddf_fun(fun);
@@ -216,5 +216,5 @@
  * @return ELIMIT	If the buffer is too short
  */
-int nic_get_address_impl(ddf_fun_t *fun, nic_address_t *address)
+errno_t nic_get_address_impl(ddf_fun_t *fun, nic_address_t *address)
 {
 	assert(address);
@@ -235,5 +235,5 @@
  * @return EOK (cannot fail)
  */
-int nic_get_stats_impl(ddf_fun_t *fun, nic_device_stats_t *stats)
+errno_t nic_get_stats_impl(ddf_fun_t *fun, nic_device_stats_t *stats)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -257,5 +257,5 @@
  * @return EOK
  */
-int nic_unicast_get_mode_impl(ddf_fun_t *fun, nic_unicast_mode_t *mode,
+errno_t nic_unicast_get_mode_impl(ddf_fun_t *fun, nic_unicast_mode_t *mode,
 	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
@@ -281,5 +281,5 @@
  * @return ENOMEM
  */
-int nic_unicast_set_mode_impl(ddf_fun_t *fun,
+errno_t nic_unicast_set_mode_impl(ddf_fun_t *fun,
 	nic_unicast_mode_t mode, const nic_address_t *addr_list, size_t addr_count)
 {
@@ -294,5 +294,5 @@
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = ENOTSUP;
+	errno_t rc = ENOTSUP;
 	if (nic_data->on_unicast_mode_change) {
 		rc = nic_data->on_unicast_mode_change(nic_data,
@@ -324,5 +324,5 @@
  * @return EOK
  */
-int nic_multicast_get_mode_impl(ddf_fun_t *fun, nic_multicast_mode_t *mode,
+errno_t nic_multicast_get_mode_impl(ddf_fun_t *fun, nic_multicast_mode_t *mode,
 	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
@@ -348,5 +348,5 @@
  * @return ENOMEM
  */
-int nic_multicast_set_mode_impl(ddf_fun_t *fun,	nic_multicast_mode_t mode,
+errno_t nic_multicast_set_mode_impl(ddf_fun_t *fun,	nic_multicast_mode_t mode,
 	const nic_address_t *addr_list, size_t addr_count)
 {
@@ -361,5 +361,5 @@
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = ENOTSUP;
+	errno_t rc = ENOTSUP;
 	if (nic_data->on_multicast_mode_change) {
 		rc = nic_data->on_multicast_mode_change(nic_data, mode, addr_list, addr_count);
@@ -381,5 +381,5 @@
  * @return EOK
  */
-int nic_broadcast_get_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t *mode)
+errno_t nic_broadcast_get_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t *mode)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -401,9 +401,9 @@
  * @return ENOMEM
  */
-int nic_broadcast_set_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t mode)
+errno_t nic_broadcast_set_mode_impl(ddf_fun_t *fun, nic_broadcast_mode_t mode)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = ENOTSUP;
+	errno_t rc = ENOTSUP;
 	if (nic_data->on_broadcast_mode_change) {
 		rc = nic_data->on_broadcast_mode_change(nic_data, mode);
@@ -427,5 +427,5 @@
  * @return EOK
  */
-int nic_blocked_sources_get_impl(ddf_fun_t *fun,
+errno_t nic_blocked_sources_get_impl(ddf_fun_t *fun,
 	size_t max_count, nic_address_t *addr_list, size_t *addr_count)
 {
@@ -450,5 +450,5 @@
  * @return ENOMEM
  */
-int nic_blocked_sources_set_impl(ddf_fun_t *fun,
+errno_t nic_blocked_sources_set_impl(ddf_fun_t *fun,
 	const nic_address_t *addr_list, size_t addr_count)
 {
@@ -458,5 +458,5 @@
 		nic_data->on_blocked_sources_change(nic_data, addr_list, addr_count);
 	}
-	int rc = nic_rxc_blocked_sources_set(&nic_data->rx_control,
+	errno_t rc = nic_rxc_blocked_sources_set(&nic_data->rx_control,
 		addr_list, addr_count);
 	fibril_rwlock_write_unlock(&nic_data->rxc_lock);
@@ -473,9 +473,9 @@
  * @return ENOENT	If the mask is not set
  */
-int nic_vlan_get_mask_impl(ddf_fun_t *fun, nic_vlan_mask_t *mask)
+errno_t nic_vlan_get_mask_impl(ddf_fun_t *fun, nic_vlan_mask_t *mask)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->rxc_lock);
-	int rc = nic_rxc_vlan_get_mask(&nic_data->rx_control, mask);
+	errno_t rc = nic_rxc_vlan_get_mask(&nic_data->rx_control, mask);
 	fibril_rwlock_read_unlock(&nic_data->rxc_lock);
 	return rc;
@@ -491,9 +491,9 @@
  * @return ENOMEM
  */
-int nic_vlan_set_mask_impl(ddf_fun_t *fun, const nic_vlan_mask_t *mask)
+errno_t nic_vlan_set_mask_impl(ddf_fun_t *fun, const nic_vlan_mask_t *mask)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_write_lock(&nic_data->rxc_lock);
-	int rc = nic_rxc_vlan_set_mask(&nic_data->rx_control, mask);
+	errno_t rc = nic_rxc_vlan_set_mask(&nic_data->rx_control, mask);
 	if (rc == EOK && nic_data->on_vlan_mask_change) {
 		nic_data->on_vlan_mask_change(nic_data, mask);
@@ -518,5 +518,5 @@
  * @return ENOMEM	If there was not enough memory to complete the operation
  */
-int nic_wol_virtue_add_impl(ddf_fun_t *fun, nic_wv_type_t type,
+errno_t nic_wol_virtue_add_impl(ddf_fun_t *fun, nic_wv_type_t type,
 	const void *data, size_t length, nic_wv_id_t *new_id)
 {
@@ -560,5 +560,5 @@
 	}
 	/* Call the user-defined add callback */
-	int rc = nic_data->on_wol_virtue_add(nic_data, virtue);
+	errno_t rc = nic_data->on_wol_virtue_add(nic_data, virtue);
 	if (rc != EOK) {
 		free(virtue->data);
@@ -593,5 +593,5 @@
  * @return ENOENT	If the virtue identifier is not valid.
  */
-int nic_wol_virtue_remove_impl(ddf_fun_t *fun, nic_wv_id_t id)
+errno_t nic_wol_virtue_remove_impl(ddf_fun_t *fun, nic_wv_id_t id)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -629,5 +629,5 @@
  * @return ENOMEM	If there was not enough memory to complete the operation
  */
-int nic_wol_virtue_probe_impl(ddf_fun_t *fun, nic_wv_id_t id,
+errno_t nic_wol_virtue_probe_impl(ddf_fun_t *fun, nic_wv_id_t id,
 	nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
 {
@@ -667,10 +667,10 @@
  * @return ENOMEM	If there was not enough memory to complete the operation
  */
-int nic_wol_virtue_list_impl(ddf_fun_t *fun, nic_wv_type_t type,
+errno_t nic_wol_virtue_list_impl(ddf_fun_t *fun, nic_wv_type_t type,
 	size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->wv_lock);
-	int rc = nic_wol_virtues_list(&nic_data->wol_virtues, type,
+	errno_t rc = nic_wol_virtues_list(&nic_data->wol_virtues, type,
 		max_count, id_list, id_count);
 	fibril_rwlock_read_unlock(&nic_data->wv_lock);
@@ -688,5 +688,5 @@
  * @return EOK		If the operation was successfully completed
   */
-int nic_wol_virtue_get_caps_impl(ddf_fun_t *fun, nic_wv_type_t type, int *count)
+errno_t nic_wol_virtue_get_caps_impl(ddf_fun_t *fun, nic_wv_type_t type, int *count)
 {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
@@ -710,5 +710,5 @@
  * @return EPARTY	Error in communication protocol
  */
-int nic_poll_get_mode_impl(ddf_fun_t *fun,
+errno_t nic_poll_get_mode_impl(ddf_fun_t *fun,
 	nic_poll_mode_t *mode, struct timeval *period)
 {
@@ -733,5 +733,5 @@
  * @return EPARTY	Error in communication protocol
  */
-int nic_poll_set_mode_impl(ddf_fun_t *fun,
+errno_t nic_poll_set_mode_impl(ddf_fun_t *fun,
 	nic_poll_mode_t mode, const struct timeval *period)
 {
@@ -754,5 +754,5 @@
 	}
 	fibril_rwlock_write_lock(&nic_data->main_lock);
-	int rc = nic_data->on_poll_mode_change(nic_data, mode, period);
+	errno_t rc = nic_data->on_poll_mode_change(nic_data, mode, period);
 	assert(rc == EOK || rc == ENOTSUP || rc == EINVAL);
 	if (rc == ENOTSUP && (nic_data->on_poll_request != NULL) && 
@@ -783,5 +783,5 @@
  * @return EINVAL	If the NIC is not in state where it allows on demand polling
  */
-int nic_poll_now_impl(ddf_fun_t *fun) {
+errno_t nic_poll_now_impl(ddf_fun_t *fun) {
 	nic_t *nic_data = nic_get_from_ddf_fun(fun);
 	fibril_rwlock_read_lock(&nic_data->main_lock);
@@ -821,5 +821,5 @@
  * @return EOK always.
  */
-int nic_open_impl(ddf_fun_t *fun)
+errno_t nic_open_impl(ddf_fun_t *fun)
 {
 	return EOK;
