Commit Graph

22 Commits

Author SHA1 Message Date
Warner Losh
7790c87b71 Free zbuf when kflag is true too.
CID: 273376
2017-12-28 05:34:04 +00: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
Marcelo Araujo
f9e059ac83 Use NULL instead of 0 for pointers.
fopen(3) returns a FILE pointer, otherwise NULL is returned.

MFC after:	2 weeks
2016-04-14 11:41:30 +00:00
Philippe Charnier
3e687cf089 remove old-style function definition
reduce WARNS=6 output
2013-02-14 14:44:08 +00:00
Eitan Adler
50e04779c4 Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Submitted by:	Erik Cederstrand
Approved by:	cperciva
MFC after:	3 days
2012-10-22 03:07:05 +00:00
Ulrich Spörlein
3df5ecac8c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
Xin LI
cf076341e7 Correct a typo 2006-06-29 09:18:16 +00:00
Marcel Moolenaar
63b1eb104f Improve 64-bit cleanliness: make sure to use long format specifiers for
long arguments. This is WARNS=2 clean now.
2004-08-30 03:11:46 +00:00
Warner Losh
486c8cc4c6 Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)
2004-08-07 04:28:56 +00:00
Jake Burkholder
c02a3aa562 Fix int/size_t mismatch for sysctl arguments. Try not to introduce more
unsorting.

Reviewed by:	bde (unsorted version)
2002-07-30 04:45:14 +00:00
Alfred Perlstein
d89167b4ea de-__P() 2002-07-11 18:31:16 +00:00
Bruce Evans
2ef41c0cb5 Reserved one of the spare fields in struct gmon to record the history
counter type, as threatened in rev.1.8 (the density doesn't need to
be recorded since it can be derived from other fields).  This doesn't
affect binary compatibility, but new utilities won't be able to depend
on the contents of this field because libc/gmon/gmon.c was broken --
it wrote garbage to the spare fields.

Added a history counter type field to struct gmonparam.  This breaks
binary compatibility a little, since kgmon wanted to read the whole
struct.  Fixed kgmon to only depend on reading the critical earlier
parts of the struct.  This should also fix 6+ year old breakage of
binary compatibility when the profrate field was added.

Only initialize the new field in struct gmon for now, so that the
compatibility code for this (in kgmon) gets tested.  The compatibility
code has to guesstimate the value.  The new field in struct gmonparam
is for the kernel to initialize so that kgmon doesn't have to guess.
2002-02-21 05:52:49 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Philippe Charnier
fa6990870e Use err(3). Add usage() and prototypes. 1997-09-23 06:38:54 +00:00
Warner Losh
6c3f552a31 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
Bruce Evans
912e603778 Implemented non-statistical kernel profiling. This is based on
looking at a high resolution clock for each of the following events:
function call, function return, interrupt entry, interrupt exit,
and interesting branches.  The differences between the times of
these events are added at appropriate places in a ordinary histogram
(as if very fast statistical profiling sampled the pc at those
places) so that ordinary gprof can be used to analyze the times.

gmon.h:
Histogram counters need to be 4 bytes for microsecond resolutions.
They will need to be larger for the 586 clock.
The comments were vax-centric and wrong even on vaxes.  Does anyone
disagree?

gprof4.c:
The standard gprof should support counters of all integral sizes
and the size of the counter should be in the gmon header.  This
hack will do until then.  (Use gprof4 -u to examine the results
of non-statistical profiling.)

config/*:
Non-statistical profiling is configured with `config -pp'.
`config -p' still gives ordinary profiling.

kgmon/*:
Non-statistical profiling is enabled with `kgmon -B'.  `kgmon -b'
still enables ordinary profiling (and distables non-statistical
profiling) if non-statistical profiling is configured.
1995-12-29 15:30:05 +00:00
Poul-Henning Kamp
7226d4fb3b <sys/user.h> -> <sys/time.h>
Spotted by: bde
1995-10-30 15:45:21 +00:00
Poul-Henning Kamp
52a28d7027 #include <sys/user.h> 1995-10-29 09:56:53 +00:00
Rodney W. Grimes
709e8f9ae1 Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
Garrett Wollman
4be4929c2b Get rid of _PATH_UNIX completely; use getbootfile(3) instead.
DANGER WILL ROBINSON!
_PATH_UNIX is currently defined as the literal string "don't use this".
I am of two minds about this myself, but wanted to get something into the
tree as quickly as possible.
1994-09-24 00:08:43 +00:00
Rodney W. Grimes
dea673e932 BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00