aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Mashak <mrv@mojatatu.com>2020-05-27 21:22:47 -0400
committerDavid Ahern <dsahern@gmail.com>2020-05-31 22:51:19 +0000
commitbd4b8c632e92526e60bc18bd8453599ea78fa42f (patch)
treec95b4c74635dd22512b0e57e8eb16806c91a8e34
parente50290e6871fd77da62380a782e7d4c4120efd9f (diff)
downloadiproute2-bd4b8c632e92526e60bc18bd8453599ea78fa42f.tar.gz
tc: report time an action was first used
Have print_tm() dump firstuse value along with install, lastuse and expires. v2: Resubmit after 'master' merged into next Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r--tc/tc_util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tc/tc_util.c b/tc/tc_util.c
index fd5fcb242..b7ff911b6 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -758,6 +758,10 @@ void print_tm(FILE *f, const struct tcf_t *tm)
print_uint(PRINT_ANY, "last_used", " used %u sec",
tm->lastuse / hz);
+ if (tm->firstuse != 0)
+ print_uint(PRINT_ANY, "first_used", " firstused %u sec",
+ tm->firstuse / hz);
+
if (tm->expires != 0)
print_uint(PRINT_ANY, "expires", " expires %u sec",
tm->expires / hz);