Changeset 205f1add in mainline for uspace/lib/drv/generic/remote_nic.c
- Timestamp:
- 2018-08-23T21:14:56Z (7 years ago)
- Children:
- f33c989e
- Parents:
- e2625b1a
- git-author:
- Jakub Jermar <jakub@…> (2018-08-21 21:58:52)
- git-committer:
- Jakub Jermar <jakub@…> (2018-08-23 21:14:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_nic.c
re2625b1a r205f1add 39 39 #include <errno.h> 40 40 #include <ipc/services.h> 41 #include < sys/time.h>41 #include <time.h> 42 42 #include <macros.h> 43 43 … … 1262 1262 */ 1263 1263 errno_t nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode, 1264 struct time val*period)1264 struct timespec *period) 1265 1265 { 1266 1266 assert(mode); … … 1280 1280 1281 1281 if (period != NULL) 1282 rc = async_data_read_start(exch, period, sizeof(struct time val));1282 rc = async_data_read_start(exch, period, sizeof(struct timespec)); 1283 1283 1284 1284 async_exchange_end(exch); … … 1296 1296 */ 1297 1297 errno_t nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode, 1298 const struct time val*period)1298 const struct timespec *period) 1299 1299 { 1300 1300 async_exch_t *exch = async_exchange_begin(dev_sess); … … 1305 1305 errno_t rc; 1306 1306 if (period) 1307 rc = async_data_write_start(exch, period, sizeof(struct time val));1307 rc = async_data_write_start(exch, period, sizeof(struct timespec)); 1308 1308 else 1309 1309 rc = EOK; … … 2405 2405 nic_poll_mode_t mode = NIC_POLL_IMMEDIATE; 2406 2406 int request_data = IPC_GET_ARG2(*call); 2407 struct time valperiod = {2407 struct timespec period = { 2408 2408 .tv_sec = 0, 2409 .tv_ usec = 02409 .tv_nsec = 0 2410 2410 }; 2411 2411 … … 2421 2421 } 2422 2422 2423 if (max_len != sizeof(struct time val)) {2423 if (max_len != sizeof(struct timespec)) { 2424 2424 async_answer_0(&data, ELIMIT); 2425 2425 async_answer_0(call, ELIMIT); … … 2428 2428 2429 2429 async_data_read_finalize(&data, &period, 2430 sizeof(struct time val));2430 sizeof(struct timespec)); 2431 2431 } 2432 2432 … … 2441 2441 nic_poll_mode_t mode = IPC_GET_ARG2(*call); 2442 2442 int has_period = IPC_GET_ARG3(*call); 2443 struct time valperiod_buf;2444 struct time val*period = NULL;2443 struct timespec period_buf; 2444 struct timespec *period = NULL; 2445 2445 size_t length; 2446 2446 … … 2453 2453 } 2454 2454 2455 if (length != sizeof(struct time val)) {2455 if (length != sizeof(struct timespec)) { 2456 2456 async_answer_0(&data, ELIMIT); 2457 2457 async_answer_0(call, ELIMIT);
Note:
See TracChangeset
for help on using the changeset viewer.