Changes in uspace/lib/net/generic/generic.c [00d7e1b:c3887ad] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/generic.c
r00d7e1b rc3887ad 104 104 nic_device_id_t device_id, uint8_t *address, size_t max_len) 105 105 { 106 if (!address) 107 return EBADMEM; 106 aid_t aid; 107 ipc_call_t result; 108 109 assert(address != NULL); 108 110 109 111 /* Request the address */ 110 112 async_exch_t *exch = async_exchange_begin(sess); 111 aid_t aid = async_send_1(exch, message, (sysarg_t) device_id, 112 NULL); 113 aid = async_send_1(exch, message, (sysarg_t) device_id, &result); 114 115 sysarg_t ipcrc; 113 116 int rc = async_data_read_start(exch, address, max_len); 114 117 async_exchange_end(exch); 115 118 116 sysarg_t result; 117 async_wait_for(aid, &result); 118 119 if (rc != EOK) 119 if (rc != EOK) { 120 async_wait_for(aid, &ipcrc); 120 121 return rc; 121 122 return (int) result; 122 } 123 124 async_wait_for(aid, &ipcrc); 125 if (ipcrc == EOK) { 126 return IPC_GET_ARG1(result); 127 } else { 128 return (int) ipcrc; 129 } 123 130 } 124 131
Note:
See TracChangeset
for help on using the changeset viewer.