From: Sebastien GODARD Date: Sun, 24 Jan 2021 09:59:17 +0000 (+0100) Subject: SVG: Use the "count" parameter entered on the command line X-Git-Tag: v12.5.3~11^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=707613b95221c37bc070df35f4cfd1d9a77ee35b;p=sysstat SVG: Use the "count" parameter entered on the command line The 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 --- diff --git a/sadf.c b/sadf.c index 61fafb6..8953f87 100644 --- 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;