]> granicus.if.org Git - sysstat/commitdiff
RAW: Check return code from check_*_reg functions
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 20 Jan 2018 19:54:41 +0000 (20:54 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 20 Jan 2018 19:54:41 +0000 (20:54 +0100)
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 <sysstat@users.noreply.github.com>
raw_stats.c

index c2742b45e27e2684ec2de76eae4026539909f18b..213b255351b5e6693b4f15b754490f0e37f73b41 100644 (file)
@@ -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 {