In "packed" mode, activities which don't have a graph (e.g. USB devices)
should not be taken into account when calculating SVG canvas height.
Without this patch, a command like:
$ sadf -g -O packed -- -A > output.svg
created a SVG file with some unused white space at its end.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
continue;
p = get_activity_position(act, id_seq[i], EXIT_IF_NOT_FOUND);
- if (!IS_SELECTED(act[p]->options))
+ if (!IS_SELECTED(act[p]->options) || !act[p]->g_nr)
continue;
if (((act[p]->id == A_NET_DEV) || (act[p]->id == A_NET_EDEV)) &&