Subject: kern/24228: RTC unfixed value in wday
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <kiyohara@kk.iij4u.or.jp>
List: netbsd-bugs
Date: 01/25/2004 06:21:19
>Number: 24228
>Category: kern
>Synopsis: RTC unfixed value in wday
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jan 25 06:22:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: KIYOHARA Takashi
>Release: NetBSD 1.6ZG
>Organization:
>Environment:
NetBSD evbppc.fool 1.6ZG NetBSD 1.6ZG (OPENBLOCKS266) #0: Sun Dec 21 12:58:20 JST 2003 lance@evbppc.fool:/sys/arch/evbppc/compile/OPENBLOCKS266 evbppc
>Description:
unfixed value in struct clock_ymdhms *dt->dt_wday.
Probably it will be a coding failure.
>How-To-Repeat:
>Fix:
Index: x1226.c
===================================================================
RCS file: /cvsroot/src/sys/dev/i2c/x1226.c,v
retrieving revision 1.1
diff -c -r1.1 x1226.c
*** x1226.c 2003/10/06 18:02:02 1.1
--- x1226.c 2004/01/15 15:14:40
***************
*** 334,339 ****
--- 334,341 ----
dt->dt_hour = FROMBCD(bcd[X1226_REG_HR - X1226_REG_RTC_BASE]
& X1226_REG_HR24_MASK);
}
+ dt->dt_wday = FROMBCD(bcd[X1226_REG_DW - X1226_REG_RTC_BASE]
+ & X1226_REG_DT_MASK);
dt->dt_day = FROMBCD(bcd[X1226_REG_DT - X1226_REG_RTC_BASE]
& X1226_REG_DT_MASK);
dt->dt_mon = FROMBCD(bcd[X1226_REG_MO - X1226_REG_RTC_BASE]
>Release-Note:
>Audit-Trail:
>Unformatted: