Changeset 205f1add in mainline for uspace/lib/nic/src/nic_impl.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/nic/src/nic_impl.c
re2625b1a r205f1add 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.