From 4ce543b127dedfa1ee36f49b1277b3bc97c605af Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sat, 20 Jan 2018 20:54:41 +0100 Subject: [PATCH] RAW: Check return code from check_*_reg functions Distinguish between new devices and devices that have been unregistered then registered again (this indication is displayed by "sadf -r" with showhints option). Signed-off-by: Sebastien GODARD --- raw_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raw_stats.c b/raw_stats.c index c2742b4..213b255 100644 --- a/raw_stats.c +++ b/raw_stats.c @@ -536,7 +536,7 @@ __print_funct_t raw_print_disk_stats(struct activity *a, char *timestr, int curr /* This is a newly registered interface. Previous stats are zero */ sdp = &sdpzero; if (DISPLAY_HINTS(flags)) { - printf(" [NEW]"); + printf(" [%s]", j == -1 ? "NEW" : "BCK"); } } else { @@ -608,7 +608,7 @@ __print_funct_t raw_print_net_dev_stats(struct activity *a, char *timestr, int c /* This is a newly registered interface. Previous stats are zero */ sndp = &sndzero; if (DISPLAY_HINTS(flags)) { - printf(" [NEW]"); + printf(" [%s]", j == -1 ? "NEW" : "BCK"); } } else { @@ -661,7 +661,7 @@ __print_funct_t raw_print_net_edev_stats(struct activity *a, char *timestr, int /* This is a newly registered interface. Previous stats are zero */ snedp = &snedzero; if (DISPLAY_HINTS(flags)) { - printf(" [NEW]"); + printf(" [%s]", j == -1 ? "NEW" : "BCK"); } } else { -- 2.40.0