From db466251a506d0af3f1eb5d0095ca151e887267d Mon Sep 17 00:00:00 2001 From: kergoth Date: Fri, 06 Dec 2002 04:13:13 +0000 Subject: Attempt to open /dev/rtc if /dev/misc/rtc fails, so it works in the nondevfs case. --- (limited to 'core/opiealarm') diff --git a/core/opiealarm/opiealarm.c b/core/opiealarm/opiealarm.c index 70e5415..bb2e684 100644 --- a/core/opiealarm/opiealarm.c +++ b/core/opiealarm/opiealarm.c @@ -240,8 +240,9 @@ int suspend ( int fix_rtc ) time ( &syst );// get the UNIX system time sys = *localtime ( &syst ); - if (( fd = open ( "/dev/misc/rtc", O_RDWR )) < 0 ) // open the RTC device - break; // ( 1, "/dev/misc/rtc" ); + if (( fd = open ( "/dev/misc/rtc", O_RDWR )) < 0 ) + if (( fd = open ( "/dev/rtc", O_RDWR )) < 0 ) + break; // ( 1, "rtc" ); memset ( &rtc, 0, sizeof ( struct tm )); // get the RTC time if ( ioctl ( fd, RTC_RD_TIME, &rtc ) < 0 ) -- cgit v0.9.0.2