Changeset 231b3fd in mainline for uspace/lib/nic/src/nic_impl.c
- Timestamp:
- 2018-08-25T21:35:26Z (7 years ago)
- Parents:
- e2625b1a (diff), 3c45353 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
- git-committer:
- GitHub <noreply@…> (2018-08-25 21:35:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_impl.c
re2625b1a r231b3fd 121 121 nic_data->poll_mode = nic_data->default_poll_mode; 122 122 memcpy(&nic_data->poll_period, &nic_data->default_poll_period, 123 sizeof(struct time val));123 sizeof(struct timespec)); 124 124 if (rc != EOK) { 125 125 /* … … 714 714 */ 715 715 errno_t nic_poll_get_mode_impl(ddf_fun_t *fun, 716 nic_poll_mode_t *mode, struct time val*period)716 nic_poll_mode_t *mode, struct timespec *period) 717 717 { 718 718 nic_t *nic_data = nic_get_from_ddf_fun(fun); 719 719 fibril_rwlock_read_lock(&nic_data->main_lock); 720 720 *mode = nic_data->poll_mode; 721 memcpy(period, &nic_data->poll_period, sizeof(struct time val));721 memcpy(period, &nic_data->poll_period, sizeof(struct timespec)); 722 722 fibril_rwlock_read_unlock(&nic_data->main_lock); 723 723 return EOK; … … 737 737 */ 738 738 errno_t nic_poll_set_mode_impl(ddf_fun_t *fun, 739 nic_poll_mode_t mode, const struct time val*period)739 nic_poll_mode_t mode, const struct timespec *period) 740 740 { 741 741 nic_t *nic_data = nic_get_from_ddf_fun(fun); … … 753 753 if (period == NULL) 754 754 return EINVAL; 755 if (period->tv_sec == 0 && period->tv_ usec == 0)755 if (period->tv_sec == 0 && period->tv_nsec == 0) 756 756 return EINVAL; 757 if (period->tv_sec < 0 || period->tv_ usec < 0)757 if (period->tv_sec < 0 || period->tv_nsec < 0) 758 758 return EINVAL; 759 759 }
Note:
See TracChangeset
for help on using the changeset viewer.