Commit graph

14 commits

Author SHA1 Message Date
Warner Losh a2f733abcf lib: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:23:59 -07:00
John Hein 633094c27f libprocstat: use elf_getphdrnum rather than deprecated elf_getphnum
PR:             273966
Reviewed by:	emaste
2023-09-21 21:47:26 -04:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Pedro F. Giffuni 5e53a4f90f lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-26 02:00:33 +00:00
Tycho Nightingale 86be94fca3 Add support for capturing 'struct ptrace_lwpinfo' for signals
resulting in a process dumping core in the corefile.

Also extend procstat to view select members of 'struct ptrace_lwpinfo'
from the contents of the note.

Sponsored by:	Dell EMC Isilon
2017-03-30 18:21:36 +00:00
Mikolaj Golub b03e2d7729 Embed revision id in the library.
MFC after:	29 days
2013-04-21 17:10:10 +00:00
Mikolaj Golub 2ff020d3c3 Add procstat_getauxv function to retrieve a process auxiliary vector.
MFC after:	1 month
2013-04-20 08:10:47 +00:00
Mikolaj Golub 4482b5e320 Extend libprocstat with functions to retrieve process command line
arguments and environment variables.

Suggested by:	stas
Reviewed by:	jhb and stas (initial version)
MFC after:	1 month
2013-04-20 08:07:04 +00:00
Mikolaj Golub eec6cb1cf2 Add procstat_getosrel function to retrieve a process osrel info.
MFC after:	1 month
2013-04-20 08:03:56 +00:00
Mikolaj Golub 7cc0ebfd10 Add procstat_getrlimit function to retrieve a process resource limits info.
MFC after:	1 month
2013-04-20 07:59:44 +00:00
Mikolaj Golub 5b9bcba971 Add procstat_getumask function to retrieve a process umask.
MFC after:	1 month
2013-04-20 07:57:08 +00:00
Mikolaj Golub 7f1d14e6e6 Add procstat_getgroups function to retrieve process groups.
MFC after:	1 month
2013-04-20 07:54:07 +00:00
Mikolaj Golub 7153ad2b72 Make libprocstat(3) extract procstat notes from a process core file.
PR:		kern/173723
Suggested by:	jhb
Glanced by:	kib
MFC after:	1 month
2013-04-20 07:47:26 +00:00