diff options
| author | Jeffrey Hsu <hsu@FreeBSD.org> | 1996-03-11 05:41:43 +0000 |
|---|---|---|
| committer | Jeffrey Hsu <hsu@FreeBSD.org> | 1996-03-11 05:41:43 +0000 |
| commit | 98d69008863b5cac9a39e84bca345888490f8d8f (patch) | |
| tree | 11a6a5abf29489374ec5eb8eb46521e6b582cec7 /usr.sbin/pstat | |
| parent | 37e4fbc4cb27952eb5534d95371529f28440ea15 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/pstat')
| -rw-r--r-- | usr.sbin/pstat/pstat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index c787fe1f53e4..92d76f7ceee5 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -977,13 +977,13 @@ filemode() * structure, and then an array of file structs (whose addresses are * derivable from the previous entry). */ - addr = *((struct file **)buf); - fp = (struct file *)(buf + sizeof(struct file *)); - nfile = (len - sizeof(struct file *)) / sizeof(struct file); + addr = ((struct filelist *)buf)->lh_first; + 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_filef, fp++) { + for (; (char *)fp < buf + len; addr = fp->f_list.le_next, fp++) { if ((unsigned)fp->f_type > DTYPE_SOCKET) continue; (void)printf("%x ", addr); |
