mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
It seems that some i386 mothermoards either do not implement the
day of week field correctly, or they remember bad values that are written into the day of week field. For this reason, ignore the day of week field when reading the clock on i386 rather than bailing if it is set incorrectly. Problems were seen on a number of platforms, including VMWare, qemu, EPIA ME6000, Epox-3PTA and ABIT-SL30T. This is a slightly different fix to that proposed by Ted in his PR, but the same basic idea. PR: 111117 Submitted by: Ted Faber <faber@lunabase.org> Approved by: re (rwatson) MFC after: 3 weeks
This commit is contained in:
parent
34ed040030
commit
9be70a793e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171612
@ -703,7 +703,8 @@ inittodr(time_t base)
|
||||
#else
|
||||
ct.year += 2000;
|
||||
#endif
|
||||
/* Should we set dow = -1 because some clocks don't set it correctly? */
|
||||
/* Set dow = -1 because some clocks don't set it correctly. */
|
||||
ct.dow = -1;
|
||||
if (clock_ct_to_ts(&ct, &ts)) {
|
||||
printf("Invalid time in clock: check and reset the date!\n");
|
||||
return;
|
||||
|
@ -703,7 +703,8 @@ inittodr(time_t base)
|
||||
#else
|
||||
ct.year += 2000;
|
||||
#endif
|
||||
/* Should we set dow = -1 because some clocks don't set it correctly? */
|
||||
/* Set dow = -1 because some clocks don't set it correctly. */
|
||||
ct.dow = -1;
|
||||
if (clock_ct_to_ts(&ct, &ts)) {
|
||||
printf("Invalid time in clock: check and reset the date!\n");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user