On 5/17/20 7:28 AM, Roman Mashak wrote: > Have print_tm() dump firstuse value along with install, lastuse > and expires. > > Signed-off-by: Roman Mashak <m...@mojatatu.com> > --- > tc/tc_util.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tc/tc_util.c b/tc/tc_util.c > index 12f865cc71bf..f6aa2ed552a9 100644 > --- a/tc/tc_util.c > +++ b/tc/tc_util.c > @@ -760,6 +760,11 @@ void print_tm(FILE *f, const struct tcf_t *tm) > print_uint(PRINT_FP, NULL, " used %u sec", > (unsigned int)(tm->lastuse/hz)); > } > + if (tm->firstuse != 0) { > + print_uint(PRINT_JSON, "first_used", NULL, tm->firstuse); > + print_uint(PRINT_FP, NULL, " firstused %u sec", > + (unsigned int)(tm->firstuse/hz)); > + } > if (tm->expires != 0) { > print_uint(PRINT_JSON, "expires", NULL, tm->expires); > print_uint(PRINT_FP, NULL, " expires %u sec", >
why does this function print different values for json and stdout?