mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 03:55:06 -05:00
client: print reference ID in hexadecimal
This is an incompatible change in the output of the tracking command, which may break some scripts, but it's necessary to avoid confusion with IPv4 addresses when synchronised to an IPv6 server or reference clock.
This commit is contained in:
5
client.c
5
client.c
@@ -1789,10 +1789,9 @@ print_report(const char *format, ...)
|
||||
else
|
||||
print_freq_ppm(dbl);
|
||||
break;
|
||||
case 'R': /* reference ID in quad-dotted notation */
|
||||
case 'R': /* reference ID in hexdecimal */
|
||||
long_uinteger = va_arg(ap, unsigned long);
|
||||
printf("%lu.%lu.%lu.%lu", long_uinteger >> 24, (long_uinteger >> 16) & 0xff,
|
||||
(long_uinteger >> 8) & 0xff, long_uinteger & 0xff);
|
||||
printf("%lX", long_uinteger);
|
||||
break;
|
||||
case 'S': /* offset with unit */
|
||||
dbl = va_arg(ap, double);
|
||||
|
||||
Reference in New Issue
Block a user