Changes in uspace/lib/net/generic/net_remote.c [e882e3a:6b82009] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/net_remote.c
re882e3a r6b82009 38 38 #include <ipc/services.h> 39 39 #include <ipc/net_net.h> 40 40 41 #include <malloc.h> 41 #include <async.h> 42 42 43 #include <generic.h> 43 44 #include <net/modules.h> … … 97 98 size_t count, uint8_t **data) 98 99 { 99 return generic_translate_req(sess, NET_NET_GET_ CONF, 0, 0,100 return generic_translate_req(sess, NET_NET_GET_DEVICE_CONF, 0, 0, 100 101 *configuration, count, configuration, data); 101 102 } … … 123 124 * 124 125 */ 125 int net_get_device_conf_req(async_sess_t *sess, nic_device_id_t device_id,126 int net_get_device_conf_req(async_sess_t *sess, device_id_t device_id, 126 127 measured_string_t **configuration, size_t count, uint8_t **data) 127 128 { … … 130 131 } 131 132 132 int net_get_devices_req(async_sess_t *sess, measured_string_t **devices,133 size_t *count, uint8_t **data)134 {135 if ((!devices) || (!count))136 return EBADMEM;137 138 async_exch_t *exch = async_exchange_begin(sess);139 140 int rc = async_req_0_1(exch, NET_NET_GET_DEVICES_COUNT, count);141 if (rc != EOK) {142 async_exchange_end(exch);143 return rc;144 }145 146 if (*count == 0) {147 async_exchange_end(exch);148 *data = NULL;149 return EOK;150 }151 152 aid_t message_id = async_send_0(exch, NET_NET_GET_DEVICES, NULL);153 rc = measured_strings_return(exch, devices, data, *count);154 155 async_exchange_end(exch);156 157 sysarg_t result;158 async_wait_for(message_id, &result);159 160 if ((rc == EOK) && (result != EOK)) {161 free(*devices);162 free(*data);163 }164 165 return (int) result;166 }167 168 133 /** @} 169 134 */
Note:
See TracChangeset
for help on using the changeset viewer.