The summary displayed by sar for USB and filesystems activities didn't
include all the items. In pacticular, filesystems or USB devices that
had been unmounted were not displayed in the summary ending the report.
This patch fixes the problem.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
* Save USB device in summary list.
*/
*sum = *suc;
+ a->nr[2] = j + 1;
break;
}
}
reallocate_all_buffers(a);
sum = (struct stats_pwr_usb *) ((char *) a->buf[2] + j * a->msize);
*sum = *suc;
+ a->nr[2] = j + 1;
}
}
}
* or free slot (end of list).
*/
*sfm = *sfc;
+ if (j >= a->nr[2]) {
+ a->nr[2] = j + 1;
+ }
break;
}
}
reallocate_all_buffers(a);
sfm = (struct stats_filesystem *) ((char *) a->buf[2] + j * a->msize);
*sfm = *sfc;
+ a->nr[2] = j + 1;
}
}
}