Lines Matching defs:rtc_fd
38 int rtc_fd = -1;
71 ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
100 ret = ioctl(rtc_fd, RTC_ALM_SET, &rtc_tm);
110 ret = ioctl(rtc_fd, RTC_ALM_READ, &rtc_tm);
124 ret = ioctl(rtc_fd, RTC_AIE_ON, 0);
136 FD_SET(rtc_fd, &rfds);
138 ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv); /*wait for alarm */
144 ret = read(rtc_fd, &data, sizeof(unsigned long));
156 ret = ioctl(rtc_fd, RTC_AIE_OFF, 0);
178 ret = ioctl(rtc_fd, RTC_UIE_ON, 0);
194 FD_SET(rtc_fd, &rfds);
196 ret = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);
201 ret = read(rtc_fd, &data, sizeof(unsigned long));
215 ret = ioctl(rtc_fd, RTC_UIE_OFF, 0);
232 rtc_fd = SAFE_OPEN(NULL, rtc_dev, O_RDONLY);
240 close(rtc_fd);