On Tue, Jun 21, 2022 at 01:38:51PM +0200, Maciek Machnikowski wrote: > Currently, if the -c parameter is used multiple times only the last > clock will be synchronized and no error will be returned. > > This patch implements proper support for multiple -c parameter and will > synchronize all clocks to the selected source.
What are the advantages over running multiple instances of phc2sys? > Signed-off-by: Maciek Machnikowski <mac...@machnikowski.net> > --- > phc2sys.c | 25 ++++++++++++++++++++----- > 1 file changed, 20 insertions(+), 5 deletions(-) Please update the man page. > @@ -1266,6 +1277,10 @@ int main(int argc, char *argv[]) > > if (!dst_name) { > dst_name = "CLOCK_REALTIME"; > + r = phc2sys_static_dst_configuration(&priv, dst_name); > + if (r) { > + goto end; > + } > } > if (hardpps_configured(pps_fd) && strcmp(dst_name, "CLOCK_REALTIME")) { > fprintf(stderr, This check won't work if someone specifies -c /dev/ptp0 -c CLOCK_REALTIME. There should be a variable counting dst clocks and maybe dst_name could be renamed to last_dst_name to avoid confusion. -- Miroslav Lichvar _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel