Update to match include files.

This commit is contained in:
mycroft 1994-08-31 03:48:18 +00:00
parent bf10f9424c
commit ad02d27da0
1 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94"; */
static char *rcsid = "$Id: pstat.c,v 1.5 1994/06/22 05:38:22 chopps Exp $";
static char *rcsid = "$Id: pstat.c,v 1.6 1994/08/31 03:48:18 mycroft Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -920,13 +920,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);