On 11/29/2020 7:50 PM, Richard Cochran wrote:
> When using a PPS time source, the PHC character device or network interface
> specified using the -s command line flag will be ignored.  Detect this
> mis-configuration and throw a usage error.
> 
> Signed-off-by: Richard Cochran <richardcoch...@gmail.com>

Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com>

> ---
>  phc2sys.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/phc2sys.c b/phc2sys.c
> index 03347f0..e65bdf5 100644
> --- a/phc2sys.c
> +++ b/phc2sys.c
> @@ -1253,6 +1253,10 @@ int main(int argc, char *argv[])
>                       "cannot use a pps device unless destination is 
> CLOCK_REALTIME\n");
>               goto bad_usage;
>       }
> +     if (hardpps_configured(pps_fd) && src_name) {
> +             fprintf(stderr, "please specify -s or -d, but not both\n");
> +             goto bad_usage;
> +     }

Should this have an associated manual page update, or is the manual page
already correct?

>  
>       print_set_progname(progname);
>       print_set_tag(config_get_string(cfg, NULL, "message_tag"));
> 


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

Reply via email to