From a2ae08e72e094de529b2ca35b9609f7166856073 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Tue, 27 Jun 2017 08:18:08 +0000 Subject: 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 --- lib/libprocstat/libprocstat.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/libprocstat') diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 34ecea1e3023..c348df1ea2f7 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -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: -- cgit v1.3