Skip to content
Commit 76a4c8b8 authored by Alex Maftei's avatar Alex Maftei Committed by Jakub Kicinski
Browse files

selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET

Previously, timestamps were printed using "%lld.%u" which is incorrect
for nanosecond values lower than 100,000,000 as they're fractional
digits, therefore leading zeros are meaningful.

This patch changes the format strings to "%lld.%09u" in order to add
leading zeros to the nanosecond value.

Fixes: 568ebc59 ("ptp: add the PTP_SYS_OFFSET ioctl to the testptp program")
Fixes: 4ec54f95 ("ptp: Fix compiler warnings in the testptp utility")
Fixes: 6ab0e475

 ("Documentation: fix misc. warnings")
Signed-off-by: default avatarAlex Maftei <alex.maftei@amd.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/20230615083404.57112-1-alex.maftei@amd.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 30134b7c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment