[Bug 260174] libprocstat's i386 procstat_getfiles() fails on amd64
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 260174] libprocstat's i386 procstat_getfiles() fails on amd64"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Dec 2021 18:05:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260174
Konstantin Belousov <kib@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kib@FreeBSD.org
--- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> ---
The following should fix it, I did not checked:
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c
index b754bc568e99..850d37598423 100644
--- a/lib/libprocstat/libprocstat.c
+++ b/lib/libprocstat/libprocstat.c
@@ -865,9 +865,7 @@ procstat_getfiles_sysctl(struct procstat *procstat, struct
kinfo_proc *kp,
cap_rights_t cap_rights;
assert(kp);
- if (kp->ki_fd == NULL)
- return (NULL);
- switch(procstat->type) {
+ switch (procstat->type) {
case PROCSTAT_SYSCTL:
files = kinfo_getfile(kp->ki_pid, &cnt);
break;
--
You are receiving this mail because:
You are the assignee for the bug.