svn commit: r320399 - head/lib/libprocstat

Ngie Cooper ngie at FreeBSD.org
Tue Jun 27 08:18:09 UTC 2017


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:


More information about the svn-src-head mailing list