Commit graph

27 commits

Author SHA1 Message Date
Warner Losh 0b8224d1cc Remove copyright strings ifdef'd out
We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by:		Netflix
2023-11-26 22:23:58 -07:00
Warner Losh bdcbfde31e usr.bin: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by:		Netflix
2023-11-26 22:23:30 -07:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Alfonso Gregory 498a0a9c61 Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:18 -06:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Conrad Meyer 17fac79462 banner(6): Squash a harmless coverity warning
The destination buffer is sized as the sum of program argument lengths, so
it has plenty of room for *argv.  Appease Coverity by using strlcpy instead
of strcpy.  Similar to a nearby cleanup performed in r316500.

No functional change.

Reported by:	Coverity (CWE-120)
CID:		1006703
Sponsored by:	Dell EMC Isilon
2017-04-13 23:22:18 +00:00
Alan Somers 9039018c34 strcpy => strlcpy, strcat => strlcat
Reported by:	Coverity
CID:		1006703 978863 1006745 1347163
Reviewed by:	cem
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D10192
2017-04-04 19:46:23 +00:00
Warner Losh fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Ed Schouten 9e43b5a097 Add missing static keywords to banner(1) 2011-11-06 08:13:51 +00:00
Joel Dahl da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Ed Schouten ef636796f6 ANSIfy various tools in usr.bin/.
Most of these tools properly build at WARNS=6, except for their K&R
function declarations. Fix this, so we can bump WARNS as well.
2010-01-02 10:09:20 +00:00
Maxim Konovalov 0d4d06c9d7 o Check that -w width is not above maximum. Use DWIDTH instead of
hardcoded constant.

Reported by:	Gruzicki Wlodek on BugTraq
Obtained from:	NetBSD, OpenBSD
MFC after:	1 week
2006-11-22 21:05:17 +00:00
Warner Losh f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
David Malone 9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Mark Murray 151aa6c35a Use __FBSDID(). 2001-12-03 01:15:28 +00:00
Ruslan Ermilov 1a084f197d Fixed the race caused by not checking the result of fgets(3):
/usr/bin/env MALLOC_OPTIONS=J banner </dev/null

PR:		bin/29074

Fixed the problem when banner(6) would eat last character:

	echo -n a | banner

MFC after:	1 week
2001-07-19 08:07:09 +00:00
Mike Heffner f332550d02 Fix overflowing on nul character.
PR:		bin/16926
MFC after:	1 week
2001-05-28 03:49:23 +00:00
Kris Kennaway 81d50432af Silence WARNS=2 and BDECFLAGS on alpha and i386
MFC After:	1 week
2001-05-20 06:16:53 +00:00
Bill Fumerola f5db5b7fcd BDECFLAGS.
while I'm here, fix bitrotted debug code generating template.
2001-03-04 12:28:57 +00:00
Philippe Charnier eb257e6ec5 Add -d and -t flags to usage. Add usage(). 2000-03-26 14:30:51 +00:00
Kris Kennaway 1b2fef9f1e Fix buffer overflow & add $FreeBSD$
Reviewed by:	imp
1999-12-04 02:11:51 +00:00
Steve Price c91f5974b9 Use const where appropriate.
PR:		10739
Submitted by:	Stephen J. Rosnowski <sjr@home.net>
Obtained from:	NetBSD PR 6151
1999-04-19 04:05:25 +00:00
Archie Cobbs fa146c5335 Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
Bruce Evans c55d6c087d Merge from Lite2 (reject widths <= 0 instead of pretending that they are 80). 1997-07-06 03:39:37 +00:00
Warner Losh 1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Rodney W. Grimes 7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00