From Lite2: file LIST changes.

This commit is contained in:
Jeffrey Hsu 1996-03-11 05:41:43 +00:00
parent 37e4fbc4cb
commit 98d6900886
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14524

View File

@ -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);