diff --git a/phc2sys.8 b/phc2sys.8 index adce4ad..a5051c8 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -54,7 +54,8 @@ should be already close to the correct time before .B phc2sys is started or the .B \-s -option should be used too. +option should be used too. This option can be used only with the system clock as +the slave clock. .TP .BI \-s " phc-device" Specify the master clock by device (e.g. /dev/ptp0) or name (e.g. CLOCK_REALTIME diff --git a/phc2sys.c b/phc2sys.c index 1c0d8b2..988a3f0 100644 --- a/phc2sys.c +++ b/phc2sys.c @@ -378,7 +378,8 @@ int main(int argc, char *argv[]) src = clock_open(phc_device); } if (!(device || src != CLOCK_INVALID) || - dst_clock.clkid == CLOCK_INVALID) { + dst_clock.clkid == CLOCK_INVALID || + (device && dst_clock.clkid != CLOCK_REALTIME)) { usage(progname); return -1; }