Commit graph

9 commits

Author SHA1 Message Date
Warner Losh fdafd315ad sys: 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:24:00 -07:00
Warner Losh 685dc743dc sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:36 -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 8a36da99de sys/kern: adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified 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-27 15:20:12 +00:00
Robert Watson dc66c5fe6f Because the argument to strvalid() is a size_t, use a size_t to iterate
over the array.

Submitted by:	stefanf
2005-01-29 13:34:22 +00:00
Robert Watson debb2f87b6 Per permission from McAfee, remove clause 3 of the BSD license on
strvalid.c.
2005-01-29 13:04:04 +00:00
David E. O'Brien ab0de15baf Use __FBSDID(). 2003-06-11 05:37:42 +00:00
Robert Watson 6e8a94b268 DBA update: used the wrong of several NAI DBAs. 2002-03-07 17:52:03 +00:00
Robert Watson 5578933d56 Add a 'strvalid()' call to libkern. Given a character pointer, and
buffer length, determine if the pointer is to a valid string.  Currently,
the only check is whether a '\0' appears in the buffer.  This is useful
when pulling in a structure from userland that may contain one or more
strings, and validity testing must be performed on elements of the
structure.  When copying normal string arguments, copyinstr() is
expected to be used.
2002-02-18 00:37:03 +00:00