diff options
author | phk <phk@FreeBSD.org> | 1999-11-20 10:00:46 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-11-20 10:00:46 +0000 |
commit | 1adcecffd93c2f4536a5031426a753b1218ed88a (patch) | |
tree | c111db9be70768372eebad9bfc9cbe47bb8a0a9d /usr.sbin/pstat | |
parent | 5354776cb2ed414ffde1c1fe64dec67336140a07 (diff) | |
download | FreeBSD-src-1adcecffd93c2f4536a5031426a753b1218ed88a.zip FreeBSD-src-1adcecffd93c2f4536a5031426a753b1218ed88a.tar.gz |
struct mountlist and struct mount.mnt_list have no business being
a CIRCLEQ. Change them to TAILQ_HEAD and TAILQ_ENTRY respectively.
This removes ugly mp != (void*)&mountlist comparisons.
Requested by: phk
Submitted by: Jake Burkholder jake@checker.org
PR: 14967
Diffstat (limited to 'usr.sbin/pstat')
-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 f76a94c..24fb157 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -677,9 +677,9 @@ kinfo_vnodes(avnodes) bp = vbuf; evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ); KGET(V_MOUNTLIST, mountlist); - for (num = 0, mp = mountlist.cqh_first; ; mp = mp_next) { + for (num = 0, mp = TAILQ_FIRST(&mountlist); ; mp = mp_next) { KGET2(mp, &mount, sizeof(mount), "mount entry"); - mp_next = mount.mnt_list.cqe_next; + mp_next = TAILQ_NEXT(&mount, mnt_list); for (vp = mount.mnt_vnodelist.lh_first; vp != NULL; vp = vp_next) { KGET2(vp, &vnode, sizeof(vnode), "vnode"); @@ -693,7 +693,7 @@ kinfo_vnodes(avnodes) bp += VNODESZ; num++; } - if (mp == mountlist.cqh_last) + if (mp == TAILQ_LAST(&mountlist, mntlist)) break; } *avnodes = num; |