]> granicus.if.org Git - sysstat/commitdiff
SVG: Use the "count" parameter entered on the command line
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 24 Jan 2021 09:59:17 +0000 (10:59 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 24 Jan 2021 09:59:17 +0000 (10:59 +0100)
The <count> parameter was not taken into account by sadf when creating
SVG graphs. Fix this.

E.g.: sadf -g datafile 1 10 > data.svg
In this example, the value 10 for the count parameter was not taken
into account and the whole datafile was used to create the graphs.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sadf.c

diff --git a/sadf.c b/sadf.c
index 61fafb65a5a34627b3a5b0f8552a1d97a9f38453..8953f8779f365cc30d85b57c2f532f80db5dfeef 100644 (file)
--- a/sadf.c
+++ b/sadf.c
@@ -968,7 +968,7 @@ void display_curr_act_graphs(int ifd, int *curr, long *cnt, int *eosaf,
                        *reset = FALSE;
                }
        }
-       while (!*eosaf);
+       while (!*eosaf && *cnt);
 
        *reset = TRUE;