From e7ac4542451f6eebf205d0ff132711ab70c325ef Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Sun, 20 May 2018 17:21:13 +0200 Subject: [PATCH] sadf: SVG: Adjust canvas height Canvas height used for SVG output (sadf -g) should be adjusted if a list of devices has been entered on the command line. Signed-off-by: Sebastien GODARD --- sadf.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sadf.c b/sadf.c index 4c8ff36..fdba3a7 100644 --- a/sadf.c +++ b/sadf.c @@ -516,6 +516,19 @@ int get_svg_graph_nr(int ifd, char *file, struct file_magic *file_magic, if (!IS_SELECTED(act[p]->options)) continue; + if (((act[p]->id == A_NET_DEV) || (act[p]->id == A_NET_EDEV)) && + (dlst_iface_idx > 0) && (dlst_iface_idx < id_nr_max[p])) { + id_nr_max[p] = dlst_iface_idx; + } + if ((act[p]->id == A_DISK) && + (dlst_dev_idx > 0) && (dlst_dev_idx < id_nr_max[p])) { + id_nr_max[p] = dlst_dev_idx; + } + if ((act[p]->id == A_FS) && + (dlst_fs_idx > 0) && (dlst_fs_idx < id_nr_max[p])) { + id_nr_max[p] = dlst_fs_idx; + } + if (PACK_VIEWS(flags)) { /* One activity = one row with multiple views */ n = 1; -- 2.40.0