we need to pass back the rtc device name that was actually used so that we can turn around and check its sysfs status
This commit is contained in:
		@@ -25,7 +25,7 @@ static time_t read_rtc(int utc)
 | 
			
		||||
	time_t ret;
 | 
			
		||||
	int fd;
 | 
			
		||||
 | 
			
		||||
	fd = rtc_xopen(rtcname, O_RDONLY);
 | 
			
		||||
	fd = rtc_xopen(&rtcname, O_RDONLY);
 | 
			
		||||
	ret = rtc_read_time(fd, utc);
 | 
			
		||||
	close(fd);
 | 
			
		||||
 | 
			
		||||
@@ -35,7 +35,7 @@ static time_t read_rtc(int utc)
 | 
			
		||||
static void write_rtc(time_t t, int utc)
 | 
			
		||||
{
 | 
			
		||||
	struct tm tm;
 | 
			
		||||
	int rtc = rtc_xopen(rtcname, O_WRONLY);
 | 
			
		||||
	int rtc = rtc_xopen(&rtcname, O_WRONLY);
 | 
			
		||||
 | 
			
		||||
	tm = *(utc ? gmtime(&t) : localtime(&t));
 | 
			
		||||
	tm.tm_isdst = 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user