Commit Graph

67 Commits

Author SHA1 Message Date
pfg
872b698bd4 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
bdrewery
a598c4b809 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
imp
7e6cabd06e 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
sevan
9ad0be57c0 dmesg(8) first appeared in 3BSD.
http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m

PR:		212443
Approved by:	bcr (mentor)
Obtained from:	TUHS
MFC after:	4 days
Differential Revision:	https://reviews.freebsd.org/D8105
2016-10-02 23:26:41 +00:00
gjb
4e38aaedb8 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
bdrewery
44973a75bb Update dependencies after r291406 added libelf to libkvm.
Unfortunately filemon/meta mode tracks all indirect dependencies here
since ld(1) is reading libelf when linking in libkvm.  Churn would be
reduced if this was able to be limited to direct dependencies.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:48 +00:00
sjg
008d7c831f Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
vangyzen
4ab93ad1b7 dmesg: accommodate message buffer growth between the sysctl calls
Allocate 12.5% extra space to avoid ENOMEM when the message buffer
is growing steadily.

Reported by:	Steve Wahl <steve_wahl@dell.com> (and tested)
Approved by:	kib (mentor)
Obtained from:	Dell Inc.
MFC after:	1 week
2015-04-20 20:07:39 +00:00
ian
44429c482c Fix minor fallout from sysctl strings being nulterminated now. The dmesg
code can read the buffer via sysctl or from a core file.  In the core file
case there will be no nulterm, and the code copes with that, but now in the
sysctl case there is a nulterm (there didn't used to be).  The least
disruptive way to restore the old behavior (and eliminate a spurious '\000'
at the end of the output) is to remove the nulterm (by decrementing the
buffer length) in the sysctl case.
2015-03-16 21:09:11 +00:00
bapt
6fdc031751 Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
sjg
5860f0d106 Updated dependencies 2014-05-16 14:09:51 +00:00
sjg
1a7e48acf1 Updated dependencies 2014-05-10 05:16:28 +00:00
sjg
62bb106222 Merge from head 2013-09-05 20:18:59 +00:00
flo
e6f7332842 Move the check whether the clear flag is set. This has 2 advantages
- When operating on a core file (-M) and -c is specified we don't clear
  the message buffer of the running system.
- If we don't have permission to clear the buffer print the error message
  only. That's what Linux does in this case, where this feature was ported
  from, and it ensures that the error message doesn't get lost in the noise.

Discussed with:	antoine, cognet
Approved by:	cognet
2013-06-11 17:46:32 +00:00
eadler
d81843f847 Bump .Dd for recent content change.
Reported by:	delphij
2013-05-10 12:49:16 +00:00
eadler
56def3d68d Add support for 'dmesg -c' which clears the dmesg buffer after it has
been printed.  This provides compatibility with other *nix systems
(including Linux).

While here use stdbool booleans for 'all'.

PR:		bin/178295
Submitted by:	Levent Serinol <lserinol@gmail.com>
Reviewed by:	will
2013-05-10 03:42:48 +00:00
sjg
6d37b86f2b Updated dependencies 2013-03-11 17:21:52 +00:00
sjg
0ee5295509 Updated dependencies 2013-02-16 01:23:54 +00:00
marcel
9dd41e3647 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
ed
5b02333e84 Add missing static keywords for global variables to tools in sbin/.
These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.
2011-11-04 13:36:02 +00:00
ru
763b9ae1f8 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
dwmalone
f15451ccbd Avoid moving onto a new line while testing if there is a syslog priority
in the buffer. This isn't exactly the patch that Stephen submitted, but
is based on one of his suggestions.

PR:		93841
Submitted by:	Stephen Montgomery-Smith <stephen@math.missouri.edu>
MFC after:	2 weeks
2006-02-27 19:13:47 +00:00
delphij
f4455c7ee2 WARNS=6 cleanup:
- signed/unsigned conform.
 - Better initialization of nlist[].  I think we should have
   something like NLIST_NULL instead of the current (ugly)
   form...
2005-01-17 13:56:46 +00:00
schweikh
b218555e7b Print a usage message if a non-option is specified.
MFC after:	3 weeks
2004-10-13 20:33:18 +00:00
stefanf
f3f8ad79f6 Don't add integers to void pointers. 2004-10-03 15:48:32 +00:00
markm
90f91e7879 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
ru
74e1fa6daf Not too much point specifying -N but not specifying -M. 2004-03-26 09:24:45 +00:00
iedowse
5d8376d847 Further simplify the code for printing the message buffer:
- Ensure that the buffer ends with "\n\0" to avoid special cases
   and allow the use of strtol().
 - Use strvisx() on each complete line instead of character by
   character.

Submitted by:	bde
MFC after:	1 week
2004-02-08 23:08:53 +00:00
iedowse
71d09d9016 Don't print the oldest line in the message buffer if the buffer is
full, since that line is almost always incomplete. Make the parsing
of <%d> lines more strict.

Also simplify the logic a little:
 - Start off by making the buffer linear so that we don't have to
   deal with it wrapping around (suggested by bde).
 - Process line by line rather than byte at a time.
2004-02-05 21:07:50 +00:00
iedowse
6bb0e5cb46 Replace the code for reading and writing the kernel message buffer
with a new implementation that has a mostly reentrant "addchar"
routine, supports multiple message buffers in the kernel, and hides
the implementation details from callers.

The new code uses a kind of sequence number to represend the current
read and write positions in the buffer. This approach (suggested
mainly by bde) permits the read and write pointers to be maintained
separately, which reduces the number of atomic operations that are
required. The "mostly reentrant" above refers to the way that while
it is now always safe to have any number of concurrent writers,
readers could see the message buffer after a writer has advanced
the pointers but before it has witten the new character.

Discussed on:	freebsd-arch
2003-06-22 02:18:31 +00:00
obrien
baba414b75 bufpos is used in size_t contexts, so make it one. 2003-05-02 07:08:52 +00:00
johan
1285e0e22b These are WARNS=2 clean, try to keep them that way. 2003-02-23 13:25:02 +00:00
trhodes
136be46680 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
bde
a8e6e41c88 Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.
2002-08-18 17:57:08 +00:00
charnier
a2accd01f0 The .Nm utility 2002-07-06 19:34:18 +00:00
imp
6718ce496e o Remove __P
o Use ANSI function definitions
o mark usage() as __dead2
2002-03-19 13:29:39 +00:00
obrien
9baf2f1b03 Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
ru
f0df63853f mdoc(7) police: compute the exact tag width. 2001-08-10 10:09:00 +00:00
sheldonh
1382e23198 Add mention of /var/run/dmesg.boot.
Yes, this isn't really the right place for it.  No, it really can't
remain undocumented.
2001-08-08 21:02:55 +00:00
billf
5e7c07338e add -a to usage()
Submitted by:	Ashley Penney <ashp@unloved.org>
MFC after:	3 days
2001-07-14 21:56:04 +00:00
ru
7cef49ff86 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
tmm
7ad9e5a6ac Update the dmesg man page to reflect the recent changes to dmesg.
Reviewed by:	ru
2001-07-05 12:32:57 +00:00
tmm
71a96b46d0 Use the kern.msgbuf sysctl to get the message buffer on a running
kernel, and remove setgid kmem, which is not needed any more.
2001-07-03 19:49:31 +00:00
ru
86642a4ab4 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
56b5d7535b Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
ru
2ae83a7282 Backout -a restriction hack.
Requested by:	rwatson
2001-02-26 08:09:51 +00:00
ru
f4bc17fe3e Restrict -a to root only.
PR:		bin/25337
2001-02-24 10:16:54 +00:00
sheldonh
eb97254875 Fix hard sentence break introduced in previous commit. 2000-12-20 13:23:50 +00:00