Index: uspace/lib/drv/generic/remote_nic.c
===================================================================
--- uspace/lib/drv/generic/remote_nic.c	(revision d5c1051faf4391647834d99babdd4a44ee5d9700)
+++ uspace/lib/drv/generic/remote_nic.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
@@ -98,5 +98,5 @@
  *
  */
-int nic_send_frame(async_sess_t *dev_sess, void *data, size_t size)
+errno_t nic_send_frame(async_sess_t *dev_sess, void *data, size_t size)
 {
 	async_exch_t *exch = async_exchange_begin(dev_sess);
@@ -105,5 +105,5 @@
 	aid_t req = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_SEND_MESSAGE, &answer);
-	int retval = async_data_write_start(exch, data, size);
+	errno_t retval = async_data_write_start(exch, data, size);
 	
 	async_exchange_end(exch);
@@ -126,10 +126,10 @@
  *
  */
-int nic_callback_create(async_sess_t *dev_sess, async_port_handler_t cfun,
+errno_t nic_callback_create(async_sess_t *dev_sess, async_port_handler_t cfun,
     void *carg)
 {
 	ipc_call_t answer;
-	int rc;
-	int retval;
+	errno_t rc;
+	errno_t retval;
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
@@ -158,5 +158,5 @@
  *
  */
-int nic_get_state(async_sess_t *dev_sess, nic_device_state_t *state)
+errno_t nic_get_state(async_sess_t *dev_sess, nic_device_state_t *state)
 {
 	assert(state);
@@ -165,5 +165,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_STATE, &_state);
 	async_exchange_end(exch);
@@ -182,8 +182,8 @@
  *
  */
-int nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_SET_STATE, state);
 	async_exchange_end(exch);
@@ -200,5 +200,5 @@
  *
  */
-int nic_get_address(async_sess_t *dev_sess, nic_address_t *address)
+errno_t nic_get_address(async_sess_t *dev_sess, nic_address_t *address)
 {
 	assert(address);
@@ -207,8 +207,8 @@
 	aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_ADDRESS, NULL);
-	int rc = async_data_read_start(exch, address, sizeof(nic_address_t));
-	async_exchange_end(exch);
-	
-	int res;
+	errno_t rc = async_data_read_start(exch, address, sizeof(nic_address_t));
+	async_exchange_end(exch);
+	
+	errno_t res;
 	async_wait_for(aid, &res);
 	
@@ -227,5 +227,5 @@
  *
  */
-int nic_set_address(async_sess_t *dev_sess, const nic_address_t *address)
+errno_t nic_set_address(async_sess_t *dev_sess, const nic_address_t *address)
 {
 	assert(address);
@@ -234,8 +234,8 @@
 	aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_SET_ADDRESS, NULL);
-	int rc = async_data_write_start(exch, address, sizeof(nic_address_t));
-	async_exchange_end(exch);
-	
-	int res;
+	errno_t rc = async_data_write_start(exch, address, sizeof(nic_address_t));
+	async_exchange_end(exch);
+	
+	errno_t res;
 	async_wait_for(aid, &res);
 	
@@ -254,5 +254,5 @@
  *
  */
-int nic_get_stats(async_sess_t *dev_sess, nic_device_stats_t *stats)
+errno_t nic_get_stats(async_sess_t *dev_sess, nic_device_stats_t *stats)
 {
 	assert(stats);
@@ -260,5 +260,5 @@
 	async_exch_t *exch = async_exchange_begin(dev_sess);
 	
-	int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_STATS);
 	if (rc != EOK) {
@@ -284,5 +284,5 @@
  *
  */
-int nic_get_device_info(async_sess_t *dev_sess, nic_device_info_t *device_info)
+errno_t nic_get_device_info(async_sess_t *dev_sess, nic_device_info_t *device_info)
 {
 	assert(device_info);
@@ -292,8 +292,8 @@
 	aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_DEVICE_INFO, NULL);
-	int rc = async_data_read_start(exch, device_info, sizeof(nic_device_info_t));
-	async_exchange_end(exch);
-
-	int res;
+	errno_t rc = async_data_read_start(exch, device_info, sizeof(nic_device_info_t));
+	async_exchange_end(exch);
+
+	errno_t res;
 	async_wait_for(aid, &res);
 	
@@ -312,5 +312,5 @@
  *
  */
-int nic_get_cable_state(async_sess_t *dev_sess, nic_cable_state_t *cable_state)
+errno_t nic_get_cable_state(async_sess_t *dev_sess, nic_cable_state_t *cable_state)
 {
 	assert(cable_state);
@@ -319,5 +319,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_CABLE_STATE, &_cable_state);
 	async_exchange_end(exch);
@@ -338,5 +338,5 @@
  *
  */
-int nic_get_operation_mode(async_sess_t *dev_sess, int *speed,
+errno_t nic_get_operation_mode(async_sess_t *dev_sess, int *speed,
    nic_channel_mode_t *duplex, nic_role_t *role)
 {
@@ -346,5 +346,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_OPERATION_MODE, &_speed, &_duplex, &_role);
 	async_exchange_end(exch);
@@ -375,9 +375,9 @@
  *
  */
-int nic_set_operation_mode(async_sess_t *dev_sess, int speed,
+errno_t nic_set_operation_mode(async_sess_t *dev_sess, int speed,
     nic_channel_mode_t duplex, nic_role_t role)
 {
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_SET_OPERATION_MODE, (sysarg_t) speed, (sysarg_t) duplex,
 	    (sysarg_t) role);
@@ -400,8 +400,8 @@
  *
  */
-int nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_AUTONEG_ENABLE, (sysarg_t) advertisement);
 	async_exchange_end(exch);
@@ -417,8 +417,8 @@
  *
  */
-int nic_autoneg_disable(async_sess_t *dev_sess)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_autoneg_disable(async_sess_t *dev_sess)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_AUTONEG_DISABLE);
 	async_exchange_end(exch);
@@ -444,5 +444,5 @@
  *
  */
-int nic_autoneg_probe(async_sess_t *dev_sess, uint32_t *our_advertisement,
+errno_t nic_autoneg_probe(async_sess_t *dev_sess, uint32_t *our_advertisement,
     uint32_t *their_advertisement, nic_result_t *result,
     nic_result_t *their_result)
@@ -454,5 +454,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_4(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_4(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_AUTONEG_PROBE, &_our_advertisement, &_their_advertisement,
 	    &_result, &_their_result);
@@ -481,8 +481,8 @@
  *
  */
-int nic_autoneg_restart(async_sess_t *dev_sess)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_autoneg_restart(async_sess_t *dev_sess)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_AUTONEG_RESTART);
 	async_exchange_end(exch);
@@ -501,5 +501,5 @@
  *
  */
-int nic_get_pause(async_sess_t *dev_sess, nic_result_t *we_send,
+errno_t nic_get_pause(async_sess_t *dev_sess, nic_result_t *we_send,
     nic_result_t *we_receive, uint16_t *pause)
 {
@@ -509,5 +509,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_GET_PAUSE, &_we_send, &_we_receive, &_pause);
 	async_exchange_end(exch);
@@ -539,9 +539,9 @@
  *
  */
-int nic_set_pause(async_sess_t *dev_sess, int allow_send, int allow_receive,
+errno_t nic_set_pause(async_sess_t *dev_sess, int allow_send, int allow_receive,
     uint16_t pause)
 {
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_SET_PAUSE, allow_send, allow_receive, pause);
 	async_exchange_end(exch);
@@ -566,5 +566,5 @@
  *
  */
-int nic_unicast_get_mode(async_sess_t *dev_sess, nic_unicast_mode_t *mode,
+errno_t nic_unicast_get_mode(async_sess_t *dev_sess, nic_unicast_mode_t *mode,
     size_t max_count, nic_address_t *address_list, size_t *address_count)
 {
@@ -579,5 +579,5 @@
 	async_exch_t *exch = async_exchange_begin(dev_sess);
 	
-	int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_UNICAST_GET_MODE, max_count, &_mode, &_address_count);
 	if (rc != EOK) {
@@ -609,5 +609,5 @@
  *
  */
-int nic_unicast_set_mode(async_sess_t *dev_sess, nic_unicast_mode_t mode,
+errno_t nic_unicast_set_mode(async_sess_t *dev_sess, nic_unicast_mode_t mode,
     const nic_address_t *address_list, size_t address_count)
 {
@@ -620,5 +620,5 @@
 	    NIC_UNICAST_SET_MODE, (sysarg_t) mode, address_count, NULL);
 	
-	int rc;
+	errno_t rc;
 	if (address_count)
 		rc = async_data_write_start(exch, address_list,
@@ -629,5 +629,5 @@
 	async_exchange_end(exch);
 	
-	int res;
+	errno_t res;
 	async_wait_for(message_id, &res);
 	
@@ -655,5 +655,5 @@
  *
  */
-int nic_multicast_get_mode(async_sess_t *dev_sess, nic_multicast_mode_t *mode,
+errno_t nic_multicast_get_mode(async_sess_t *dev_sess, nic_multicast_mode_t *mode,
     size_t max_count, nic_address_t *address_list, size_t *address_count)
 {
@@ -668,5 +668,5 @@
 	
 	sysarg_t ac;
-	int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_MULTICAST_GET_MODE, max_count, &_mode, &ac);
 	if (rc != EOK) {
@@ -697,5 +697,5 @@
  *
  */
-int nic_multicast_set_mode(async_sess_t *dev_sess, nic_multicast_mode_t mode,
+errno_t nic_multicast_set_mode(async_sess_t *dev_sess, nic_multicast_mode_t mode,
     const nic_address_t *address_list, size_t address_count)
 {
@@ -708,5 +708,5 @@
 	    NIC_MULTICAST_SET_MODE, (sysarg_t) mode, address_count, NULL);
 	
-	int rc;
+	errno_t rc;
 	if (address_count)
 		rc = async_data_write_start(exch, address_list,
@@ -717,5 +717,5 @@
 	async_exchange_end(exch);
 	
-	int res;
+	errno_t res;
 	async_wait_for(message_id, &res);
 	
@@ -734,5 +734,5 @@
  *
  */
-int nic_broadcast_get_mode(async_sess_t *dev_sess, nic_broadcast_mode_t *mode)
+errno_t nic_broadcast_get_mode(async_sess_t *dev_sess, nic_broadcast_mode_t *mode)
 {
 	assert(mode);
@@ -741,5 +741,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_BROADCAST_GET_MODE, &_mode);
 	async_exchange_end(exch);
@@ -758,8 +758,8 @@
  *
  */
-int nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_BROADCAST_SET_MODE, mode);
 	async_exchange_end(exch);
@@ -776,5 +776,5 @@
  *
  */
-int nic_defective_get_mode(async_sess_t *dev_sess, uint32_t *mode)
+errno_t nic_defective_get_mode(async_sess_t *dev_sess, uint32_t *mode)
 {
 	assert(mode);
@@ -783,5 +783,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_DEFECTIVE_GET_MODE, &_mode);
 	async_exchange_end(exch);
@@ -800,8 +800,8 @@
  *
  */
-int nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_DEFECTIVE_SET_MODE, mode);
 	async_exchange_end(exch);
@@ -822,5 +822,5 @@
  *
  */
-int nic_blocked_sources_get(async_sess_t *dev_sess, size_t max_count,
+errno_t nic_blocked_sources_get(async_sess_t *dev_sess, size_t max_count,
     nic_address_t *address_list, size_t *address_count)
 {
@@ -831,5 +831,5 @@
 	
 	sysarg_t ac;
-	int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_BLOCKED_SOURCES_GET, max_count, &ac);
 	if (rc != EOK) {
@@ -858,5 +858,5 @@
  *
  */
-int nic_blocked_sources_set(async_sess_t *dev_sess,
+errno_t nic_blocked_sources_set(async_sess_t *dev_sess,
     const nic_address_t *address_list, size_t address_count)
 {
@@ -869,5 +869,5 @@
 	    NIC_BLOCKED_SOURCES_SET, address_count, NULL);
 	
-	int rc;
+	errno_t rc;
 	if (address_count)
 		rc = async_data_write_start(exch, address_list,
@@ -878,5 +878,5 @@
 	async_exchange_end(exch);
 	
-	int res;
+	errno_t res;
 	async_wait_for(message_id, &res);
 	
@@ -895,10 +895,10 @@
  *
  */
-int nic_vlan_get_mask(async_sess_t *dev_sess, nic_vlan_mask_t *mask)
+errno_t nic_vlan_get_mask(async_sess_t *dev_sess, nic_vlan_mask_t *mask)
 {
 	assert(mask);
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_VLAN_GET_MASK);
 	if (rc != EOK) {
@@ -923,5 +923,5 @@
  *
  */
-int nic_vlan_set_mask(async_sess_t *dev_sess, const nic_vlan_mask_t *mask)
+errno_t nic_vlan_set_mask(async_sess_t *dev_sess, const nic_vlan_mask_t *mask)
 {
 	async_exch_t *exch = async_exchange_begin(dev_sess);
@@ -930,5 +930,5 @@
 	    NIC_VLAN_SET_MASK, mask != NULL, NULL);
 	
-	int rc;
+	errno_t rc;
 	if (mask != NULL)
 		rc = async_data_write_start(exch, mask, sizeof(nic_vlan_mask_t));
@@ -938,5 +938,5 @@
 	async_exchange_end(exch);
 	
-	int res;
+	errno_t res;
 	async_wait_for(message_id, &res);
 	
@@ -963,8 +963,8 @@
  *
  */
-int nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, bool strip)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, bool strip)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_VLAN_SET_TAG, (sysarg_t) tag, (sysarg_t) add, (sysarg_t) strip);
 	async_exchange_end(exch);
@@ -985,5 +985,5 @@
  *
  */
-int nic_wol_virtue_add(async_sess_t *dev_sess, nic_wv_type_t type,
+errno_t nic_wol_virtue_add(async_sess_t *dev_sess, nic_wv_type_t type,
     const void *data, size_t length, nic_wv_id_t *id)
 {
@@ -997,7 +997,7 @@
 	    NIC_WOL_VIRTUE_ADD, (sysarg_t) type, send_data, &result);
 	
-	int res;
+	errno_t res;
 	if (send_data) {
-		int rc = async_data_write_start(exch, data, length);
+		errno_t rc = async_data_write_start(exch, data, length);
 		if (rc != EOK) {
 			async_exchange_end(exch);
@@ -1022,8 +1022,8 @@
  *
  */
-int nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_WOL_VIRTUE_REMOVE, (sysarg_t) id);
 	async_exchange_end(exch);
@@ -1045,5 +1045,5 @@
  *
  */
-int nic_wol_virtue_probe(async_sess_t *dev_sess, nic_wv_id_t id,
+errno_t nic_wol_virtue_probe(async_sess_t *dev_sess, nic_wv_id_t id,
     nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
 {
@@ -1056,5 +1056,5 @@
 	async_exch_t *exch = async_exchange_begin(dev_sess);
 	
-	int rc = async_req_3_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_3_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_WOL_VIRTUE_PROBE, (sysarg_t) id, max_length,
 	    &_type, &_length);
@@ -1095,5 +1095,5 @@
  *
  */
-int nic_wol_virtue_list(async_sess_t *dev_sess, nic_wv_type_t type,
+errno_t nic_wol_virtue_list(async_sess_t *dev_sess, nic_wv_type_t type,
     size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
 {
@@ -1104,5 +1104,5 @@
 	
 	sysarg_t count;
-	int rc = async_req_3_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_3_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_WOL_VIRTUE_LIST, (sysarg_t) type, max_count, &count);
 	
@@ -1135,5 +1135,5 @@
  *
  */
-int nic_wol_virtue_get_caps(async_sess_t *dev_sess, nic_wv_type_t type,
+errno_t nic_wol_virtue_get_caps(async_sess_t *dev_sess, nic_wv_type_t type,
     int *count)
 {
@@ -1143,5 +1143,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_WOL_VIRTUE_GET_CAPS, (sysarg_t) type, &_count);
 	async_exchange_end(exch);
@@ -1173,5 +1173,5 @@
  *
  */
-int nic_wol_load_info(async_sess_t *dev_sess, nic_wv_type_t *matched_type,
+errno_t nic_wol_load_info(async_sess_t *dev_sess, nic_wv_type_t *matched_type,
     size_t max_length, uint8_t *frame, size_t *frame_length)
 {
@@ -1186,5 +1186,5 @@
 	async_exch_t *exch = async_exchange_begin(dev_sess);
 	
-	int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_WOL_LOAD_INFO, max_length, &_matched_type, &_frame_length);
 	if (rc != EOK) {
@@ -1213,5 +1213,5 @@
  *
  */
-int nic_offload_probe(async_sess_t *dev_sess, uint32_t *supported,
+errno_t nic_offload_probe(async_sess_t *dev_sess, uint32_t *supported,
     uint32_t *active)
 {
@@ -1223,5 +1223,5 @@
 	
 	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_1_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_OFFLOAD_PROBE, &_supported, &_active);
 	async_exchange_end(exch);
@@ -1241,8 +1241,8 @@
  *
  */
-int nic_offload_set(async_sess_t *dev_sess, uint32_t mask, uint32_t active)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+errno_t nic_offload_set(async_sess_t *dev_sess, uint32_t mask, uint32_t active)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_AUTONEG_RESTART, (sysarg_t) mask, (sysarg_t) active);
 	async_exchange_end(exch);
@@ -1261,5 +1261,5 @@
  *
  */
-int nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
+errno_t nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
     struct timeval *period)
 {
@@ -1270,5 +1270,5 @@
 	async_exch_t *exch = async_exchange_begin(dev_sess);
 	
-	int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
+	errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
 	    NIC_POLL_GET_MODE, period != NULL, &_mode);
 	if (rc != EOK) {
@@ -1295,5 +1295,5 @@
  *
  */
-int nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
+errno_t nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
     const struct timeval *period)
 {
@@ -1303,5 +1303,5 @@
 	    NIC_POLL_SET_MODE, (sysarg_t) mode, period != NULL, NULL);
 	
-	int rc;
+	errno_t rc;
 	if (period)
 		rc = async_data_write_start(exch, period, sizeof(struct timeval));
@@ -1311,5 +1311,5 @@
 	async_exchange_end(exch);
 	
-	int res;
+	errno_t res;
 	async_wait_for(message_id, &res);
 	
@@ -1327,8 +1327,8 @@
  *
  */
-int nic_poll_now(async_sess_t *dev_sess)
-{
-	async_exch_t *exch = async_exchange_begin(dev_sess);
-	int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_POLL_NOW);
+errno_t nic_poll_now(async_sess_t *dev_sess)
+{
+	async_exch_t *exch = async_exchange_begin(dev_sess);
+	errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_POLL_NOW);
 	async_exchange_end(exch);
 	
@@ -1344,5 +1344,5 @@
 	void *data;
 	size_t size;
-	int rc;
+	errno_t rc;
 	
 	rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
@@ -1363,5 +1363,5 @@
 	assert(nic_iface->callback_create);
 	
-	int rc = nic_iface->callback_create(dev);
+	errno_t rc = nic_iface->callback_create(dev);
 	async_answer_0(callid, rc);
 }
@@ -1375,5 +1375,5 @@
 	nic_device_state_t state = NIC_STATE_MAX;
 	
-	int rc = nic_iface->get_state(dev, &state);
+	errno_t rc = nic_iface->get_state(dev, &state);
 	async_answer_1(callid, rc, state);
 }
@@ -1387,5 +1387,5 @@
 	nic_device_state_t state = (nic_device_state_t) IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->set_state(dev, state);
+	errno_t rc = nic_iface->set_state(dev, state);
 	async_answer_0(callid, rc);
 }
@@ -1400,5 +1400,5 @@
 	memset(&address, 0, sizeof(nic_address_t));
 	
-	int rc = nic_iface->get_address(dev, &address);
+	errno_t rc = nic_iface->get_address(dev, &address);
 	if (rc == EOK) {
 		size_t max_len;
@@ -1451,5 +1451,5 @@
 	
 	if (nic_iface->set_address != NULL) {
-		int rc = nic_iface->set_address(dev, &address);
+		errno_t rc = nic_iface->set_address(dev, &address);
 		async_answer_0(callid, rc);
 	} else
@@ -1469,5 +1469,5 @@
 	memset(&stats, 0, sizeof(nic_device_stats_t));
 	
-	int rc = nic_iface->get_stats(dev, &stats);
+	errno_t rc = nic_iface->get_stats(dev, &stats);
 	if (rc == EOK) {
 		ipc_callid_t data_callid;
@@ -1504,5 +1504,5 @@
 	memset(&info, 0, sizeof(nic_device_info_t));
 	
-	int rc = nic_iface->get_device_info(dev, &info);
+	errno_t rc = nic_iface->get_device_info(dev, &info);
 	if (rc == EOK) {
 		ipc_callid_t data_callid;
@@ -1538,5 +1538,5 @@
 	nic_cable_state_t cs = NIC_CS_UNKNOWN;
 	
-	int rc = nic_iface->get_cable_state(dev, &cs);
+	errno_t rc = nic_iface->get_cable_state(dev, &cs);
 	async_answer_1(callid, rc, (sysarg_t) cs);
 }
@@ -1555,5 +1555,5 @@
 	nic_role_t role = NIC_ROLE_UNKNOWN;
 	
-	int rc = nic_iface->get_operation_mode(dev, &speed, &duplex, &role);
+	errno_t rc = nic_iface->get_operation_mode(dev, &speed, &duplex, &role);
 	async_answer_3(callid, rc, (sysarg_t) speed, (sysarg_t) duplex,
 	    (sysarg_t) role);
@@ -1573,5 +1573,5 @@
 	nic_role_t role = (nic_role_t) IPC_GET_ARG4(*call);
 	
-	int rc = nic_iface->set_operation_mode(dev, speed, duplex, role);
+	errno_t rc = nic_iface->set_operation_mode(dev, speed, duplex, role);
 	async_answer_0(callid, rc);
 }
@@ -1588,5 +1588,5 @@
 	uint32_t advertisement = (uint32_t) IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->autoneg_enable(dev, advertisement);
+	errno_t rc = nic_iface->autoneg_enable(dev, advertisement);
 	async_answer_0(callid, rc);
 }
@@ -1601,5 +1601,5 @@
 	}
 	
-	int rc = nic_iface->autoneg_disable(dev);
+	errno_t rc = nic_iface->autoneg_disable(dev);
 	async_answer_0(callid, rc);
 }
@@ -1619,5 +1619,5 @@
 	nic_result_t their_result = NIC_RESULT_NOT_AVAILABLE;
 	
-	int rc = nic_iface->autoneg_probe(dev, &our_adv, &their_adv, &result,
+	errno_t rc = nic_iface->autoneg_probe(dev, &our_adv, &their_adv, &result,
 	    &their_result);
 	async_answer_4(callid, rc, our_adv, their_adv, (sysarg_t) result,
@@ -1634,5 +1634,5 @@
 	}
 	
-	int rc = nic_iface->autoneg_restart(dev);
+	errno_t rc = nic_iface->autoneg_restart(dev);
 	async_answer_0(callid, rc);
 }
@@ -1651,5 +1651,5 @@
 	uint16_t pause;
 	
-	int rc = nic_iface->get_pause(dev, &we_send, &we_receive, &pause);
+	errno_t rc = nic_iface->get_pause(dev, &we_send, &we_receive, &pause);
 	async_answer_3(callid, rc, we_send, we_receive, pause);
 }
@@ -1668,5 +1668,5 @@
 	uint16_t pause = (uint16_t) IPC_GET_ARG4(*call);
 	
-	int rc = nic_iface->set_pause(dev, allow_send, allow_receive,
+	errno_t rc = nic_iface->set_pause(dev, allow_send, allow_receive,
 	    pause);
 	async_answer_0(callid, rc);
@@ -1697,5 +1697,5 @@
 	size_t address_count = 0;
 	
-	int rc = nic_iface->unicast_get_mode(dev, &mode, max_count, address_list,
+	errno_t rc = nic_iface->unicast_get_mode(dev, &mode, max_count, address_list,
 	    &address_count);
 	
@@ -1768,5 +1768,5 @@
 	
 	if (nic_iface->unicast_set_mode != NULL) {
-		int rc = nic_iface->unicast_set_mode(dev, mode, address_list,
+		errno_t rc = nic_iface->unicast_set_mode(dev, mode, address_list,
 		    address_count);
 		async_answer_0(callid, rc);
@@ -1801,5 +1801,5 @@
 	size_t address_count = 0;
 	
-	int rc = nic_iface->multicast_get_mode(dev, &mode, max_count, address_list,
+	errno_t rc = nic_iface->multicast_get_mode(dev, &mode, max_count, address_list,
 	    &address_count);
 	
@@ -1872,5 +1872,5 @@
 	
 	if (nic_iface->multicast_set_mode != NULL) {
-		int rc = nic_iface->multicast_set_mode(dev, mode, address_list,
+		errno_t rc = nic_iface->multicast_set_mode(dev, mode, address_list,
 		    address_count);
 		async_answer_0(callid, rc);
@@ -1892,5 +1892,5 @@
 	nic_broadcast_mode_t mode = NIC_BROADCAST_ACCEPTED;
 	
-	int rc = nic_iface->broadcast_get_mode(dev, &mode);
+	errno_t rc = nic_iface->broadcast_get_mode(dev, &mode);
 	async_answer_1(callid, rc, mode);
 }
@@ -1907,5 +1907,5 @@
 	nic_broadcast_mode_t mode = IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->broadcast_set_mode(dev, mode);
+	errno_t rc = nic_iface->broadcast_set_mode(dev, mode);
 	async_answer_0(callid, rc);
 }
@@ -1922,5 +1922,5 @@
 	uint32_t mode = 0;
 	
-	int rc = nic_iface->defective_get_mode(dev, &mode);
+	errno_t rc = nic_iface->defective_get_mode(dev, &mode);
 	async_answer_1(callid, rc, mode);
 }
@@ -1937,5 +1937,5 @@
 	uint32_t mode = IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->defective_set_mode(dev, mode);
+	errno_t rc = nic_iface->defective_set_mode(dev, mode);
 	async_answer_0(callid, rc);
 }
@@ -1964,5 +1964,5 @@
 	size_t address_count = 0;
 	
-	int rc = nic_iface->blocked_sources_get(dev, max_count, address_list,
+	errno_t rc = nic_iface->blocked_sources_get(dev, max_count, address_list,
 	    &address_count);
 	
@@ -2034,5 +2034,5 @@
 	
 	if (nic_iface->blocked_sources_set != NULL) {
-		int rc = nic_iface->blocked_sources_set(dev, address_list,
+		errno_t rc = nic_iface->blocked_sources_set(dev, address_list,
 		    address_count);
 		async_answer_0(callid, rc);
@@ -2055,5 +2055,5 @@
 	memset(&vlan_mask, 0, sizeof(nic_vlan_mask_t));
 	
-	int rc = nic_iface->vlan_get_mask(dev, &vlan_mask);
+	errno_t rc = nic_iface->vlan_get_mask(dev, &vlan_mask);
 	if (rc == EOK) {
 		ipc_callid_t data_callid;
@@ -2111,5 +2111,5 @@
 	
 	if (nic_iface->vlan_set_mask != NULL) {
-		int rc = nic_iface->vlan_set_mask(dev, vlan_mask_pointer);
+		errno_t rc = nic_iface->vlan_set_mask(dev, vlan_mask_pointer);
 		async_answer_0(callid, rc);
 	} else
@@ -2131,5 +2131,5 @@
 	bool strip = (int) IPC_GET_ARG4(*call);
 	
-	int rc = nic_iface->vlan_set_tag(dev, tag, add, strip);
+	errno_t rc = nic_iface->vlan_set_tag(dev, tag, add, strip);
 	async_answer_0(callid, rc);
 }
@@ -2180,5 +2180,5 @@
 	nic_wv_type_t type = (nic_wv_type_t) IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->wol_virtue_add(dev, type, data, length, &id);
+	errno_t rc = nic_iface->wol_virtue_add(dev, type, data, length, &id);
 	async_answer_1(callid, rc, (sysarg_t) id);
 	free(data);
@@ -2197,5 +2197,5 @@
 	nic_wv_id_t id = (nic_wv_id_t) IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->wol_virtue_remove(dev, id);
+	errno_t rc = nic_iface->wol_virtue_remove(dev, id);
 	async_answer_0(callid, rc);
 }
@@ -2228,5 +2228,5 @@
 	memset(data, 0, max_length);
 	
-	int rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length,
+	errno_t rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length,
 	    data, &length);
 	
@@ -2278,5 +2278,5 @@
 	memset(id_list, 0, max_count * sizeof (nic_wv_id_t));
 	
-	int rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list,
+	errno_t rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list,
 	    &count);
 	
@@ -2315,5 +2315,5 @@
 	nic_wv_type_t type = (nic_wv_type_t) IPC_GET_ARG2(*call);
 	
-	int rc = nic_iface->wol_virtue_get_caps(dev, type, &count);
+	errno_t rc = nic_iface->wol_virtue_get_caps(dev, type, &count);
 	async_answer_1(callid, rc, (sysarg_t) count);
 }
@@ -2343,5 +2343,5 @@
 	memset(data, 0, max_length);
 	
-	int rc = nic_iface->wol_load_info(dev, &type, max_length, data,
+	errno_t rc = nic_iface->wol_load_info(dev, &type, max_length, data,
 	    &frame_length);
 	if (rc == EOK) {
@@ -2376,5 +2376,5 @@
 	uint32_t active = 0;
 	
-	int rc = nic_iface->offload_probe(dev, &supported, &active);
+	errno_t rc = nic_iface->offload_probe(dev, &supported, &active);
 	async_answer_2(callid, rc, supported, active);
 }
@@ -2392,5 +2392,5 @@
 	uint32_t active = (uint32_t) IPC_GET_ARG3(*call);
 	
-	int rc = nic_iface->offload_set(dev, mask, active);
+	errno_t rc = nic_iface->offload_set(dev, mask, active);
 	async_answer_0(callid, rc);
 }
@@ -2412,5 +2412,5 @@
 	};
 	
-	int rc = nic_iface->poll_get_mode(dev, &mode, &period);
+	errno_t rc = nic_iface->poll_get_mode(dev, &mode, &period);
 	if ((rc == EOK) && (request_data)) {
 		size_t max_len;
@@ -2470,5 +2470,5 @@
 	
 	if (nic_iface->poll_set_mode != NULL) {
-		int rc = nic_iface->poll_set_mode(dev, mode, period);
+		errno_t rc = nic_iface->poll_set_mode(dev, mode, period);
 		async_answer_0(callid, rc);
 	} else
@@ -2485,5 +2485,5 @@
 	}
 	
-	int rc = nic_iface->poll_now(dev);
+	errno_t rc = nic_iface->poll_now(dev);
 	async_answer_0(callid, rc);
 }
