diff options
author | jkh <jkh@FreeBSD.org> | 1995-08-11 20:49:26 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-08-11 20:49:26 +0000 |
commit | 4c75091b0cfb2be2b7768463acdb8f9847db70bd (patch) | |
tree | 858146f85a576e8b04144de4b9f6059db40f7c8d /usr.sbin/pstat/pstat.c | |
parent | 01e1d4224eae57204c70c62c485d0e98a79ac1bc (diff) | |
download | FreeBSD-src-4c75091b0cfb2be2b7768463acdb8f9847db70bd.zip FreeBSD-src-4c75091b0cfb2be2b7768463acdb8f9847db70bd.tar.gz |
Since the mountlist is now a circular queue, adjust the names of the
queue members used and also add a check to see when we've wrapped
around again.
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r-- | usr.sbin/pstat/pstat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index 5467e55..597c385 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -727,8 +727,9 @@ kinfo_vnodes(avnodes) bp = vbuf; evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ); KGET(V_MOUNTLIST, mountlist); - for (num = 0, mp = mountlist.tqh_first; - mp != NULL; mp = mp->mnt_list.tqe_next) { + for (num = 0, mp = mountlist.cqh_first; + mp != NULL && !(num && 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) { |