• Alessandro Rubini's avatar
    time-wrs: fix for a mishap when WR time starts at 0. · 4dbc6b0b
    Alessandro Rubini authored
    System time is used for log messages and nothing critical, so we'd
    better have it different from WR time, when WR time is clearly wrong.
    This commit avoids setting Unix time from WR time when WR time is
    clearly wrong (i.e. earlier than today).
    
    This, among other things, fixes a "fatal error" startup failure when
    two free-running WRS devices are turned one at the same time
    (noted by Adam Wujek).
    
    This is because the master was counting from zero and the slave,
    was setting system time accordingly; but the slave's boot procedure
    already used wr_date to set the utc/tai offset, and system time
    as a result  was being set to a negative value -- tai's being small,
    "tai - 35" was negative.
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    4dbc6b0b
Name
Last commit
Last update
arch-bare-i386 Loading commit data...
arch-bare-x86-64 Loading commit data...
arch-sim Loading commit data...
arch-unix Loading commit data...
arch-wrpc Loading commit data...
arch-wrs Loading commit data...
configs Loading commit data...
doc Loading commit data...
etc Loading commit data...
include/ppsi Loading commit data...
lib Loading commit data...
lib-bare Loading commit data...
pp_printf Loading commit data...
proto-ext-whiterabbit Loading commit data...
proto-standard Loading commit data...
scripts Loading commit data...
time-bare Loading commit data...
time-sim Loading commit data...
time-unix Loading commit data...
time-wrpc Loading commit data...
time-wrs Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Kconfig Loading commit data...
MAKEALL Loading commit data...
Makefile Loading commit data...
Makefile.kconfig Loading commit data...
diag.c Loading commit data...
fsm.c Loading commit data...