Changes in uspace/lib/nic/src/nic_impl.c [205f1add:984a9ba] in mainline
- File:
-
- 1 edited
-
uspace/lib/nic/src/nic_impl.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/nic/src/nic_impl.c
r205f1add r984a9ba 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 spec));123 sizeof(struct timeval)); 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 spec*period)716 nic_poll_mode_t *mode, struct timeval *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 spec));721 memcpy(period, &nic_data->poll_period, sizeof(struct timeval)); 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 spec*period)739 nic_poll_mode_t mode, const struct timeval *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_ nsec == 0)755 if (period->tv_sec == 0 && period->tv_usec == 0) 756 756 return EINVAL; 757 if (period->tv_sec < 0 || period->tv_ nsec < 0)757 if (period->tv_sec < 0 || period->tv_usec < 0) 758 758 return EINVAL; 759 759 }
Note:
See TracChangeset
for help on using the changeset viewer.
