From 502b52163c8f245f4cfdc7a48e8d5d1e89c64b21 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Tue, 4 Dec 2012 13:21:53 +0100 Subject: [PATCH] pmc: correct the integer format string wrt decimal verses hexadecimal. Signed-off-by: Richard Cochran --- pmc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pmc.c b/pmc.c index 843f9fc..3a70fac 100644 --- a/pmc.c +++ b/pmc.c @@ -205,8 +205,8 @@ static void pmc_show(struct ptp_message *msg, FILE *fp) fprintf(fp, "DEFAULT_DATA_SET " IFMT "numberPorts %hu" IFMT "priority1 %hhu" - IFMT "clockClass 0x%02hhx" - IFMT "clockAccuracy %hhu" + IFMT "clockClass %hhu" + IFMT "clockAccuracy 0x%02hhx" IFMT "offsetScaledLogVariance 0x%04hx" IFMT "priority2 %hhu" IFMT "clockIdentity %s" @@ -235,10 +235,10 @@ static void pmc_show(struct ptp_message *msg, FILE *fp) IFMT "parentPortIdentity %s" IFMT "parentStats %hhu" IFMT "observedParentOffsetScaledLogVariance 0x%04hx" - IFMT "observedParentClockPhaseChangeRate %d" + IFMT "observedParentClockPhaseChangeRate 0x%08x" IFMT "grandmasterPriority1 %hhu" - IFMT "gm.ClockClass 0x%02hhx" - IFMT "gm.ClockAccuracy %hhu" + IFMT "gm.ClockClass %hhu" + IFMT "gm.ClockAccuracy 0x%02hhx" IFMT "gm.OffsetScaledLogVariance 0x%04hx" IFMT "grandmasterPriority2 %hhu" IFMT "grandmasterIdentity %s", @@ -263,7 +263,7 @@ static void pmc_show(struct ptp_message *msg, FILE *fp) IFMT "ptpTimescale %d" IFMT "timeTraceable %d" IFMT "frequencyTraceable %d" - IFMT "timeSource %d", + IFMT "timeSource 0x%02hhx", tp->currentUtcOffset, tp->flags & LEAP_61 ? 1 : 0, tp->flags & LEAP_59 ? 1 : 0,