From: Maciej Machnikowski <maciej.machnikow...@intel.com>

If no other Time of Day source is specified use the system timer
by default.

Signed-off-by: Maciej Machnikowski <mac...@machnikowski.net>
---
 config.c | 2 +-
 ts2phc.8 | 1 +
 ts2phc.c | 6 ------
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/config.c b/config.c
index 33176f4..3710ed1 100644
--- a/config.c
+++ b/config.c
@@ -330,7 +330,7 @@ struct config_item config_tab[] = {
        PORT_ITEM_INT("ts2phc.perout_phase", -1, 0, 999999999),
        PORT_ITEM_INT("ts2phc.pin_index", 0, 0, INT_MAX),
        GLOB_ITEM_INT("ts2phc.pulsewidth", 500000000, 1000000, 999000000),
-       GLOB_ITEM_STR("ts2phc.tod_source", ""),
+       GLOB_ITEM_STR("ts2phc.tod_source", "generic"),
        PORT_ITEM_ENU("tsproc_mode", TSPROC_FILTER, tsproc_enu),
        GLOB_ITEM_INT("twoStepFlag", 1, 0, 1),
        GLOB_ITEM_INT("tx_timestamp_timeout", 10, 1, INT_MAX),
diff --git a/ts2phc.8 b/ts2phc.8
index 68d54a2..661041d 100644
--- a/ts2phc.8
+++ b/ts2phc.8
@@ -168,6 +168,7 @@ device (like /dev/ptp0) or its associated network interface 
(like
 eth0).
 Use the key word "nmea" for an external 1-PPS from a GPS providing ToD
 information via the RMC NMEA sentence.
+The default is "generic"
 .TP
 .B ts2phc.nmea_remote_host, ts2phc.nmea_remote_port
 Specifies the remote host providing ToD information when using the
diff --git a/ts2phc.c b/ts2phc.c
index d8cea17..3966836 100644
--- a/ts2phc.c
+++ b/ts2phc.c
@@ -718,12 +718,6 @@ int main(int argc, char *argv[])
        if (!tod_source)
                tod_source = config_get_string(cfg, NULL, "ts2phc.tod_source");
 
-       if (!tod_source) {
-               fprintf(stderr, "no PPS source specified\n");
-               ts2phc_cleanup(&priv);
-               usage(progname);
-               return -1;
-       }
        if (ts2phc_pps_sinks_init(&priv)) {
                fprintf(stderr, "failed to initialize PPS sinks\n");
                ts2phc_cleanup(&priv);
-- 
2.37.0 (Apple Git-136)



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to