diff options
| author | David Greenman <dg@FreeBSD.org> | 1995-08-11 23:40:31 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1995-08-11 23:40:31 +0000 |
| commit | d219a12e16e277a8c01534d1f6fd3533a7e15f98 (patch) | |
| tree | 41eea994fb016cad7ce47c1c823b5670b6e3a70d /usr.sbin | |
| parent | 4cdd3a40697dfe6530ca14644fc71daa7523ab03 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/pstat/pstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 597c385e0fbc..cfff165ffe3c 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -727,9 +727,7 @@ kinfo_vnodes(avnodes) bp = vbuf; evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ); KGET(V_MOUNTLIST, mountlist); - for (num = 0, mp = mountlist.cqh_first; - mp != NULL && !(num && mp == mountlist.cqh_first); - mp = mp->mnt_list.cqe_next) { + for (num = 0, mp = mountlist.cqh_first; ; mp = mp->mnt_list.cqe_next) { KGET2(mp, &mount, sizeof(mount), "mount entry"); for (vp = mount.mnt_vnodelist.lh_first; vp != NULL; vp = vp->v_mntvnodes.le_next) { @@ -743,6 +741,8 @@ kinfo_vnodes(avnodes) bp += VNODESZ; num++; } + if (mp == mountlist.cqh_last) + break; } *avnodes = num; return ((struct e_vnode *)vbuf); |
