Date: Tue, 27 Jun 2017 08:18:08 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320399 - head/lib/libprocstat Message-ID: <201706270818.v5R8I8kb088184@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Jun 27 08:18:08 2017 New Revision: 320399 URL: https://svnweb.freebsd.org/changeset/base/320399 Log: procstat_getptlwpinfo(..): clarify the fact that KVM/SYSCTL support isn't supported This will make the error message reported in bug 220023 a bit more intuitive for end-users that don't have access to the source code to decode the procstat->type argument. MFC after: 1 month MFC with: r316286 PR: 220023 Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Tue Jun 27 06:44:32 2017 (r320398) +++ head/lib/libprocstat/libprocstat.c Tue Jun 27 08:18:08 2017 (r320399) @@ -2510,6 +2510,12 @@ struct ptrace_lwpinfo * procstat_getptlwpinfo(struct procstat *procstat, unsigned int *cntp) { switch (procstat->type) { + case PROCSTAT_KVM: + warnx("kvm method is not supported"); + return (NULL); + case PROCSTAT_SYSCTL: + warnx("sysctl method is not supported"); + return (NULL); case PROCSTAT_CORE: return (procstat_getptlwpinfo_core(procstat->core, cntp)); default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706270818.v5R8I8kb088184>