mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
From Lite2: file LIST changes.
This commit is contained in:
parent
37e4fbc4cb
commit
98d6900886
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14524
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user