git: f0a7a1bda375 - stable/14 - fstat: identify kqueue, mqueue, and procdesc file descriptors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Jul 2025 23:31:57 UTC
The branch stable/14 has been updated by asomers:
URL: https://cgit.FreeBSD.org/src/commit/?id=f0a7a1bda3752c906ef732e89c00371a3ba0760f
commit f0a7a1bda3752c906ef732e89c00371a3ba0760f
Author: Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2025-01-28 17:59:41 +0000
Commit: Alan Somers <asomers@FreeBSD.org>
CommitDate: 2025-07-23 23:31:20 +0000
fstat: identify kqueue, mqueue, and procdesc file descriptors
When displaying kqueue, mqueue, and procdesc file descriptors, identify
them as such. There aren't any details, but it's better than a scary
warning like "unknown file type 15 for file 6 of pid 26393".
Sponsored by: ConnectWise
Differential Revision: https://reviews.freebsd.org/D48706
(cherry picked from commit b3168306a13b9d95c2b01bf7a483c1af9ec0d797)
---
usr.bin/fstat/fstat.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index c3374ecfffac..3462033c3617 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -300,14 +300,26 @@ print_file_info(struct procstat *procstat, struct filestat *fst,
case PS_FST_TYPE_PTS:
print_pts_info(procstat, fst);
break;
+ case PS_FST_TYPE_KQUEUE:
+ printf(" [kqueue]");
+ break;
+ case PS_FST_TYPE_MQUEUE:
+ printf(" [mqueue]");
+ break;
case PS_FST_TYPE_SHM:
print_shm_info(procstat, fst);
break;
case PS_FST_TYPE_SEM:
print_sem_info(procstat, fst);
break;
+ case PS_FST_TYPE_PROCDESC:
+ printf(" [procdesc]");
+ break;
case PS_FST_TYPE_DEV:
break;
+ case PS_FST_TYPE_EVENTFD:
+ printf(" [eventfd]");
+ break;
default:
if (vflg)
fprintf(stderr,