Lines Matching refs:wtime

104 convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft)  in convert_to_efi_time()  argument
107 eft->year = wtime->tm_year + 1900; in convert_to_efi_time()
108 eft->month = wtime->tm_mon + 1; in convert_to_efi_time()
109 eft->day = wtime->tm_mday; in convert_to_efi_time()
110 eft->hour = wtime->tm_hour; in convert_to_efi_time()
111 eft->minute = wtime->tm_min; in convert_to_efi_time()
112 eft->second = wtime->tm_sec; in convert_to_efi_time()
114 eft->daylight = wtime->tm_isdst ? EFI_ISDST: 0; in convert_to_efi_time()
119 convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime) in convert_from_efi_time() argument
121 memset(wtime, 0, sizeof(struct rtc_time)); in convert_from_efi_time()
122 wtime->tm_sec = eft->second; in convert_from_efi_time()
123 wtime->tm_min = eft->minute; in convert_from_efi_time()
124 wtime->tm_hour = eft->hour; in convert_from_efi_time()
125 wtime->tm_mday = eft->day; in convert_from_efi_time()
126 wtime->tm_mon = eft->month - 1; in convert_from_efi_time()
127 wtime->tm_year = eft->year - 1900; in convert_from_efi_time()
130 wtime->tm_wday = compute_wday(eft); in convert_from_efi_time()
133 wtime->tm_yday = compute_yday(eft); in convert_from_efi_time()
138 wtime->tm_isdst = 1; in convert_from_efi_time()
141 wtime->tm_isdst = 0; in convert_from_efi_time()
144 wtime->tm_isdst = -1; in convert_from_efi_time()
157 struct rtc_time wtime; in efi_rtc_ioctl() local
190 convert_from_efi_time(&eft, &wtime); in efi_rtc_ioctl()
192 return copy_to_user((void *)arg, &wtime, sizeof (struct rtc_time)) ? - EFAULT : 0; in efi_rtc_ioctl()
198 if (copy_from_user(&wtime, (struct rtc_time *)arg, sizeof(struct rtc_time)) ) in efi_rtc_ioctl()
201 convert_to_efi_time(&wtime, &eft); in efi_rtc_ioctl()
218 || copy_from_user(&wtime, &ewp->time, sizeof(struct rtc_time)) ) in efi_rtc_ioctl()
221 convert_to_efi_time(&wtime, &eft); in efi_rtc_ioctl()
251 convert_from_efi_time(&eft, &wtime); in efi_rtc_ioctl()
253 return copy_to_user((void *)&ewp->time, &wtime, sizeof(struct rtc_time)) ? -EFAULT : 0; in efi_rtc_ioctl()