diff options
author | 2020-06-22 18:25:57 +0000 | |
---|---|---|
committer | 2020-06-22 18:25:57 +0000 | |
commit | bf2d84a07eb2512358d130f21cd3f3c03b4c2d28 (patch) | |
tree | 81886a8022d8f218fffde7f683d953f584b38ff3 /lib/libc/stdlib/reallocarray.c | |
parent | Remove unused variable (diff) | |
download | wireguard-openbsd-bf2d84a07eb2512358d130f21cd3f3c03b4c2d28.tar.xz wireguard-openbsd-bf2d84a07eb2512358d130f21cd3f3c03b4c2d28.zip |
inittodr(9): introduce dedicated flag to enable writes from resettodr(9)
We don't want resettodr(9) to write the RTC until inittodr(9) has
actually run. Until inittodr(9) calls tc_setclock() the system UTC
clock will contain a meaningless value and there's no sense in
overwriting a good value with a value we know is nonsense.
This is not an uncommon problem if you're debugging a problem in early
boot, e.g. a panic that occurs prior to inittodr(9).
Currently we use the following logic in resettodr(9) to inhibit writes:
if (time_second == 1)
return;
... this is too magical.
A better way to accomplish the same thing is to introduce a dedicated
flag set from inittodr(9). Hence, "inittodr_done".
Suggested by visa@.
ok kettenis@
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions