Openmoko Bug #2156: rtctest.c does not exit with stable-tracking kernel
Openmoko Public Trac
bugs at docs.openmoko.org
Thu Dec 4 04:49:31 CET 2008
#2156: rtctest.c does not exit with stable-tracking kernel
-----------------------------+----------------------------------------------
Reporter: lindi | Owner: balajirrao
Type: defect | Status: accepted
Priority: normal | Milestone:
Component: System Software | Version: unspecified
Severity: normal | Keywords:
Haspatch: 0 | Blockedby:
Estimated: | Patchreview:
Blocking: | Reproducible:
-----------------------------+----------------------------------------------
Comment(by werner):
Balaji, you gave me a good riddle there ;-)
wkalrm works more by accident - it just sends back the value it has
read. So as long as your alarm occurs on the same day, you're fine.
If not ... you'll have a good excuse for showing up late at work :-)
Further investigation on the kernel side shows that RTC_ALM_SET uses
a value of -1 to indicate that the field should be ignored. However,
we don't recognize this special value and just try to convert it into
BCD, apparently yielding Friday.
There are several ways of dealing with this. We could just handle a
tm_wday of -1 as "ignore", but that would still require applications
using RTC_WKALM_SET to set this field, which probably isn't something
we should expect them to do.
I posted a patch to openmoko-kernel that just unceremoniously ignores
tm_wday. This follows the example of mktime(3) that also ignores the
redundant fields tm_wday and tm_yday. We were already ignoring the
latter.
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2156#comment:8>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
More information about the buglog
mailing list