for (i = 0; i < a->nr[curr]; i++) {
sdc = (struct stats_disk *) ((char *) a->buf[curr] + i * a->msize);
+ /* Get device name */
+ item_name = get_sa_devname(sdc->major, sdc->minor, flags);
+
+ if (dlst_dev_idx) {
+ /* A list of devices has been entered on the command line */
+ if (!search_sa_dlist(st_dev_list, dlst_dev_idx, item_name))
+ /* Device not found */
+ continue;
+ }
+
/* Look for corresponding graph */
for (k = 0; k < svg_p->nr_max; k++) {
if ((sdc->major == *(spmax + k * 9 + 8)) &&
pos = k * 9;
unregistered = outsize + pos + 8;
- j = check_disk_reg(a, curr, !curr, i);
- if (j < 0) {
- /* This is a newly registered interface. Previous stats are zero */
- sdp = &sdpzero;
- }
- else {
- sdp = (struct stats_disk *) ((char *) a->buf[!curr] + j * a->msize);
- }
-
/*
* If current device was marked as previously unregistered,
* then set restart variable to TRUE so that the graph will be
*(spmin + pos + 8) = sdc->minor;
}
+ j = check_disk_reg(a, curr, !curr, i);
+ if (j < 0) {
+ /* This is a newly registered interface. Previous stats are zero */
+ sdp = &sdpzero;
+ }
+ else {
+ sdp = (struct stats_disk *) ((char *) a->buf[!curr] + j * a->msize);
+ }
+
/* Check for min/max values */
save_extrema(local_types_nr, (void *) sdc, (void *) sdp,
itv, spmin + pos, spmax + pos, g_fields);