summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat/pstat.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2000-12-30 14:19:07 +0000
committerphk <phk@FreeBSD.org>2000-12-30 14:19:07 +0000
commit624a962108df14a9a904a9ac46261f55cfffe7ff (patch)
treeedbbe10943449bdc905b22de6870241ccb47bac3 /usr.sbin/pstat/pstat.c
parentc0346114b4590c09ae58acb02e4c0fadd22738d4 (diff)
downloadFreeBSD-src-624a962108df14a9a904a9ac46261f55cfffe7ff.zip
FreeBSD-src-624a962108df14a9a904a9ac46261f55cfffe7ff.tar.gz
Use the MACRO API to <sys/queue.h>.
Submitted by: "Peter Avalos" <pavalos@theshell.com>
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r--usr.sbin/pstat/pstat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 75eb1a6..826b19e 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -679,10 +679,10 @@ kinfo_vnodes(avnodes)
for (num = 0, mp = TAILQ_FIRST(&mountlist); ; mp = mp_next) {
KGET2(mp, &mount, sizeof(mount), "mount entry");
mp_next = TAILQ_NEXT(&mount, mnt_list);
- for (vp = mount.mnt_vnodelist.lh_first;
+ for (vp = LIST_FIRST(&mount.mnt_vnodelist);
vp != NULL; vp = vp_next) {
KGET2(vp, &vnode, sizeof(vnode), "vnode");
- vp_next = vnode.v_mntvnodes.le_next;
+ vp_next = LIST_NEXT(&vnode, v_mntvnodes);
if ((bp + VPTRSZ + VNODESZ) > evbuf)
/* XXX - should realloc */
errx(1, "no more room for vnodes");
@@ -896,13 +896,13 @@ filemode()
* structure, and then an array of file structs (whose addresses are
* derivable from the previous entry).
*/
- addr = ((struct filelist *)buf)->lh_first;
+ addr = LIST_FIRST((struct filelist *)buf);
fp = (struct file *)(buf + sizeof(struct filelist));
nfile = (len - sizeof(struct filelist)) / sizeof(struct file);
(void)printf("%d/%d open files\n", nfile, maxfile);
(void)printf(" LOC TYPE FLG CNT MSG DATA OFFSET\n");
- for (; (char *)fp < buf + len; addr = fp->f_list.le_next, fp++) {
+ for (; (char *)fp < buf + len; addr = LIST_NEXT(fp, f_list), fp++) {
if ((unsigned)fp->f_type > DTYPE_SOCKET)
continue;
(void)printf("%8lx ", (u_long)(void *)addr);
OpenPOWER on IntegriCloud