kstat_chain_update in first call to get_multi_kstats

This commit is contained in:
Doug MacEachern 2005-12-09 20:33:20 +00:00
parent 85c55bc8ba
commit 42cbd0df47
1 changed files with 2 additions and 1 deletions

View File

@ -12,11 +12,12 @@ int sigar_get_multi_kstats(sigar_t *sigar,
kstat_t *ksp; kstat_t *ksp;
int i = 0; int i = 0;
int dev; int dev;
kid_t id = sigar_kstat_update(sigar);
name += kl->nlen; /* e.g. "hme0" + 3 */ name += kl->nlen; /* e.g. "hme0" + 3 */
dev = atoi(name); dev = atoi(name);
if ((kl->num == 0) || (sigar_kstat_update(sigar) > 0)) { if ((kl->num == 0) || (id > 0)) {
while ((ksp = kstat_lookup(kc, kl->name, i, NULL))) { while ((ksp = kstat_lookup(kc, kl->name, i, NULL))) {
if (i+1 > kl->num) { if (i+1 > kl->num) {
kl->num = i+1; kl->num = i+1;