Commit graph

44 commits

Author SHA1 Message Date
Warner Losh e043f37205 bin: 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
Warner Losh 90aea514c6 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:28 -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
Dag-Erling Smørgrav a8e8a91445 pax: name all supported formats.
Sponsored by:	Klara, Inc.
2022-09-13 18:13:19 +02:00
Dag-Erling Smørgrav 0266a5d610 pax: comment typo fixes from NetBSD / OpenBSD.
Sponsored by:	Klara, Inc.
2022-09-13 17:58:59 +02:00
Dag-Erling Smørgrav 30c30e220a pax: remove 4.4BSD compatibility
Sponsored by:	Klara, Inc.
2022-09-13 17:36:37 +02: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
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
Baptiste Daroussin a651f2bc6c Rename getline with get_line to avoid collision with getline(3)
When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from:	NetBSD
2016-05-10 11:11:23 +00:00
Eitan Adler d6e1f8d70c Implement pax -O option to permit limiting a PAX archive to a single volume.
-O Force the archive to be one volume.  If a volume ends prematurely, pax will
not prompt for a new volume.

PR:		198481
Submitted by:	Sevan Janiyan
Reviewed by:	allanjude (doc)
2015-03-18 05:48:05 +00:00
Kevin Lo 248825e568 Stop the options string leak if it is not attached into the options
linked list.

Obtained from:	OpenBSD
2014-01-26 07:20:32 +00:00
Ed Schouten ae824d80f2 Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be
committed into LLVM sources soon, warns about potentially missing
`static' keywords, similar to -Wmissing-prototypes.

- bin/pax: Move external declaration of chdname and s_mask into extern.h.
- bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h.
- sbin/mount_fusefs: Remove char *progname; use getprogname().
- others: add `static' where possible.
2012-10-19 05:43:38 +00:00
Ulrich Spörlein 01c9917634 Fix a bunch of typos and a couple of whitespace nits.
Helped by:	codespell and vim's spellchecker
2011-05-22 14:03:38 +00:00
Mark Murray 6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
Mark Murray 16fc3635f7 Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
Mark Murray 40feca3a99 Fix a bazillion warnings. This makes almost the whole of src/bin/*
WARNS=6, std=c99 clean.

Tested on:	i386, alpha
2003-05-03 16:39:34 +00:00
David E. O'Brien cee22cbd29 Fix signed/unsigned mix comparisons involving sizeof. 2003-05-02 00:03:10 +00:00
Jens Schweikhardt 9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Bruce Evans b4bb70cca3 Removed extra $FreeBSD$. Moved #if 0 for the vendor id to the correct
place.  Restored indent protection of copyright comment.
2002-08-22 01:07:16 +00:00
Tom Rhodes 7d971bbf29 s/filesystem/file system/ as discussed on -developers 2002-08-21 17:32:44 +00:00
David E. O'Brien 2749b14129 Consistently use FBSDID 2002-06-30 05:15:05 +00:00
Tom Rhodes ebd4324457 Consistancy check s/file system/filesystem/
Reviewed by:	brian
2002-05-16 01:57:20 +00:00
Philippe Charnier c113db6945 Do not return(f_returning_void());. Spell FALLTHROUGH to make it lint()able. 2002-04-12 20:23:51 +00:00
Warner Losh f789b2611b Ooops, forgot to remove the registers here. 2002-02-02 07:07:59 +00:00
Warner Losh 46251dde8f o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
  they already are.
2002-02-02 06:48:10 +00:00
Kris Kennaway b1787dec81 Sync up with OpenBSD. Too many changes to note, but the major features
are:
* Implement cpio compatibility mode when pax is invoked as cpio
* Extend tar compatibility mode to cover many of the GNU tar single-letter
  options (bzip2 mode, aka -y/-j is not present in OpenBSD).  When
  invoked as tar, pax is now full-featured enough for use by the ports
  collection to extract distfiles and create packages.
* Many bug fixes to the operation of pax and the tar compatibility modes
* Code fixes for things like correct string buffer termination.

I tried to preserve existing FreeBSD fixes to this utility; please let me
know if I have inadvertently spammed something.
2001-05-08 06:19:06 +00:00
Kris Kennaway 1192d531bf Add -z flag to pax to allow gzipping of archive output. Add -z and -Z (gzip
and compress) to pax when used in tar mode (invoked as 'tar') for
compatibility with GNU tar.

bzip2 functionality for further GNU tar compatibility will be added at a
later date.

Note in the manpage that -z is non-standard.

Obtained from:	OpenBSD
Reviewed by:	-hackers
MFC after:	2 weeks
2001-05-05 01:10:13 +00:00
Kris Kennaway d12dd1a1b5 Whitespace cleanup pass; reduce diffs with OpenBSD. No functional changes. 2001-04-26 09:22:28 +00:00
Kris Kennaway 778766fe4d Reduce diffs with OpenBSD:
#if __STDC__ -> #ifdef __STDC__
  pax_warn() -> paxwarn()
  sys_warn() -> syswarn()
  (foo *)NULL -> NULL
  bcopy -> memmove()/memcpy()
  bzero -> memset()
  Typo fixes
  sprintf() -> snprintf()
  rindex() -> strrchr()
  index() -> strchr()
  sys_errlist[] -> strerror()

Obtained from:	OpenBSD
2001-04-26 08:37:00 +00:00
Jeroen Ruigrok van der Werven 9a01d32bfd Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Submitted to look at by:	kris
2001-02-06 10:39:38 +00:00
Warner Losh 2c15efcfb5 Don't explicitly declare optarg and optind. These are declared in
unistd.h, which is already included.
2000-08-16 05:14:49 +00:00
Peter Wemm 2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Kris Kennaway 46be34b902 Various spelling/formatting changes.
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
1999-05-08 10:22:15 +00:00
Philippe Charnier c9a8d1f4dd Correct use of .Nm. Add rcsid. 1998-05-15 06:30:58 +00:00
Eivind Eklund 007d33500e Remove simultaneous include of <sys/param.h> and <sys/types.h>.
Reorder includes to be alphabetical some places since I already was in
here.
1997-12-10 22:18:54 +00:00
Søren Schmidt a885d9dcf9 Dont have an internal function named "warn" it clashes with libc..
Needed for ELF.
1997-08-29 16:12:30 +00:00
Warner Losh 93ef08af3e compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
Peter Wemm b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Steve Price 78b09ffeaf -Wall cleaning. 1996-12-14 06:08:03 +00:00
Andrey A. Chernov c2ad0566d6 Remove unneded ctype.h everywhere
Add setlocale LC_TIME
1995-10-23 21:23:27 +00:00
Joerg Wunsch 0fd510b71a You will find enclosed some changes to make gcc -Wall more happy in
/usr/src/bin. Note that some patches are still needed in that directory.

I (Joerg) finished most of Philippe's cleanup.  /bin/sh will still
need *allot* of work, however.

Submitted by:	charnier@lirmm.fr (Philippe Charnier)
1995-03-19 13:29:28 +00:00
David Greenman 89730b290a Added $Id$ 1994-09-24 02:59:15 +00:00
Rodney W. Grimes 4b88c807ea BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00