diff options
author | hsu <hsu@FreeBSD.org> | 1996-03-11 05:41:43 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 1996-03-11 05:41:43 +0000 |
commit | 6ee23b6d3109e767076e589ee510d2c70f205392 (patch) | |
tree | 11a6a5abf29489374ec5eb8eb46521e6b582cec7 /usr.sbin/pstat | |
parent | 5f68927341797bbbbee86ab3586002f53845d26f (diff) | |
download | FreeBSD-src-6ee23b6d3109e767076e589ee510d2c70f205392.zip FreeBSD-src-6ee23b6d3109e767076e589ee510d2c70f205392.tar.gz |
From Lite2: file LIST changes.
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 c787fe1..92d76f7 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); |