phc2sys: Require either -O or -w on command line
The default zero offset can lead to misalignment between system clocks or wrong time to be broadcast to the domain. Therefore we require setting offset upon invocation. Signed-off-by: Libor Pechacek <lpechacek@suse.cz>master
parent
6e4734316f
commit
a29b3bc4f9
|
@ -109,10 +109,10 @@ minimize the error caused by random delays in scheduling and bus utilization.
|
||||||
The default is 5.
|
The default is 5.
|
||||||
.TP
|
.TP
|
||||||
.BI \-O " offset"
|
.BI \-O " offset"
|
||||||
Specify the offset between the slave and master times in seconds. The default
|
Specify the offset between the slave and master times in seconds. See
|
||||||
is set automatically with the
|
.SM
|
||||||
.B \-w
|
.B TIME SCALE USAGE
|
||||||
option, 0 otherwise.
|
below.
|
||||||
.TP
|
.TP
|
||||||
.BI \-u " summary-updates"
|
.BI \-u " summary-updates"
|
||||||
Specify the number of clock updates included in summary statistics. The
|
Specify the number of clock updates included in summary statistics. The
|
||||||
|
|
|
@ -684,6 +684,13 @@ int main(int argc, char *argv[])
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!wait_sync && !forced_sync_offset) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"time offset must be specified using -w or -O\n");
|
||||||
|
usage(progname);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (dst_clock.stats_max_count > 0) {
|
if (dst_clock.stats_max_count > 0) {
|
||||||
dst_clock.offset_stats = stats_create();
|
dst_clock.offset_stats = stats_create();
|
||||||
dst_clock.freq_stats = stats_create();
|
dst_clock.freq_stats = stats_create();
|
||||||
|
|
Loading…
Reference in New Issue