From 1655c39dedd99259254880961c7dcf4e644a6470 Mon Sep 17 00:00:00 2001 From: Finn Callies Date: Thu, 11 Apr 2024 09:57:09 +0200 Subject: [PATCH] cpacfstats: add counter numbers to output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the counter numbers to the corresponding counter names to the cpacfstats output. This aims to ease using this tool with other related tools which may use other names for the counters. Signed-off-by: Finn Callies Reviewed-by: Harald Freudenberger Signed-off-by: Jan Höppner --- cpacfstats/cpacfstats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpacfstats/cpacfstats.c b/cpacfstats/cpacfstats.c index f29b8da6..626475a8 100644 --- a/cpacfstats/cpacfstats.c +++ b/cpacfstats/cpacfstats.c @@ -226,7 +226,8 @@ static void print_virtual_counter_answer(int s, if (paictr > MAX_NUM_PAI) eprint("Pai counter number too big: %d\n", paictr); else if (!paiprintnonzero || paivalue > 0) - printf(" %-45s: %lu\n", get_ctr_name(paictr), paivalue); + printf(" (%3d) %-45s: %lu\n", paictr + 1, + get_ctr_name(paictr), paivalue); } }