pstat.c (83653) | pstat.c (85339) |
---|---|
1/*- 2 * Copyright (c) 1980, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95"; 43#endif 44static const char rcsid[] = | 1/*- 2 * Copyright (c) 1980, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 28 unchanged lines hidden (view full) --- 37 The Regents of the University of California. All rights reserved.\n"; 38#endif /* not lint */ 39 40#ifndef lint 41#if 0 42static char sccsid[] = "@(#)pstat.c 8.16 (Berkeley) 5/9/95"; 43#endif 44static const char rcsid[] = |
45 "$FreeBSD: head/usr.sbin/pstat/pstat.c 83653 2001-09-18 23:34:44Z peter $"; | 45 "$FreeBSD: head/usr.sbin/pstat/pstat.c 85339 2001-10-23 01:21:29Z dillon $"; |
46#endif /* not lint */ 47 48#include <sys/param.h> 49#include <sys/time.h> 50#include <sys/vnode.h> 51#include <sys/ucred.h> 52#define _KERNEL 53#include <sys/file.h> --- 634 unchanged lines hidden (view full) --- 688 if ((vbuf = malloc((numvnodes + 20) * (VPTRSZ + VNODESZ))) == NULL) 689 errx(1, "malloc"); 690 bp = vbuf; 691 evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ); 692 KGET(V_MOUNTLIST, mountlist); 693 for (num = 0, mp = TAILQ_FIRST(&mountlist); ; mp = mp_next) { 694 KGET2(mp, &mount, sizeof(mount), "mount entry"); 695 mp_next = TAILQ_NEXT(&mount, mnt_list); | 46#endif /* not lint */ 47 48#include <sys/param.h> 49#include <sys/time.h> 50#include <sys/vnode.h> 51#include <sys/ucred.h> 52#define _KERNEL 53#include <sys/file.h> --- 634 unchanged lines hidden (view full) --- 688 if ((vbuf = malloc((numvnodes + 20) * (VPTRSZ + VNODESZ))) == NULL) 689 errx(1, "malloc"); 690 bp = vbuf; 691 evbuf = vbuf + (numvnodes + 20) * (VPTRSZ + VNODESZ); 692 KGET(V_MOUNTLIST, mountlist); 693 for (num = 0, mp = TAILQ_FIRST(&mountlist); ; mp = mp_next) { 694 KGET2(mp, &mount, sizeof(mount), "mount entry"); 695 mp_next = TAILQ_NEXT(&mount, mnt_list); |
696 for (vp = LIST_FIRST(&mount.mnt_vnodelist); | 696 for (vp = TAILQ_FIRST(&mount.mnt_nvnodelist); |
697 vp != NULL; vp = vp_next) { 698 KGET2(vp, &vnode, sizeof(vnode), "vnode"); | 697 vp != NULL; vp = vp_next) { 698 KGET2(vp, &vnode, sizeof(vnode), "vnode"); |
699 vp_next = LIST_NEXT(&vnode, v_mntvnodes); | 699 vp_next = TAILQ_NEXT(&vnode, v_nmntvnodes); |
700 if ((bp + VPTRSZ + VNODESZ) > evbuf) 701 /* XXX - should realloc */ 702 errx(1, "no more room for vnodes"); 703 memmove(bp, &vp, VPTRSZ); 704 bp += VPTRSZ; 705 memmove(bp, &vnode, VNODESZ); 706 bp += VNODESZ; 707 num++; --- 341 unchanged lines hidden --- | 700 if ((bp + VPTRSZ + VNODESZ) > evbuf) 701 /* XXX - should realloc */ 702 errx(1, "no more room for vnodes"); 703 memmove(bp, &vp, VPTRSZ); 704 bp += VPTRSZ; 705 memmove(bp, &vnode, VNODESZ); 706 bp += VNODESZ; 707 num++; --- 341 unchanged lines hidden --- |