From ad02d27da009dcc3fdf337040df9b262990206dd Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 31 Aug 1994 03:48:18 +0000 Subject: [PATCH] Update to match include files. --- usr.sbin/pstat/pstat.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c index f3c8dffdf3af..d9dc33a2ed46 100644 --- a/usr.sbin/pstat/pstat.c +++ b/usr.sbin/pstat/pstat.c @@ -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 @@ -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);