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.
This commit is contained in:
Jordan K. Hubbard 1995-08-11 20:49:26 +00:00
parent 7fe369dc9c
commit 4cdd3a4069

View File

@ -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) {