Commit Graph

8805 Commits

Author SHA1 Message Date
Tim Kientzle
acf18d7a97 Also accept --uncompress as a synonym for -Z.
Thanks to: Joerg Sonnenberger
2008-03-15 03:11:13 +00:00
Tim Kientzle
e1dedd79ed --chroot implementation thanks to Joerg Sonnenberger. 2008-03-15 03:06:46 +00:00
Tim Kientzle
f2e9d875ca Support --compress as a synonym for -Z. 2008-03-15 02:45:57 +00:00
Tim Kientzle
53f3a9d49f Enable and document the -Z option for selecting "compress" compression,
now that libarchive supports it.
2008-03-15 02:41:44 +00:00
David E. O'Brien
8757b00e1e uuidgen has been repo-copied from usr.bin/ to bin/ to match its "new"
(2007/04/09) installation location.
2008-03-13 17:38:06 +00:00
Jeff Roberson
cffe6e824b - When running a new command cause cpuset to operate on the per-thread mask
by default rather than the setmask.  This is consistent with the linux
   tool and more consistent with the notion that the default level is
   the process level.  The cpuset mask can still be modified by specifying
   the -c option.  You can not set the per-thread and cpuset mask in
   a single command.
 - Update the man page to reflect this change.

Contributed by:	gallatin
2008-03-12 23:54:40 +00:00
David E. O'Brien
f312f6a655 If the special target .MAKEFILEDEPS exists, then enable the
"remaking makefiles" feature.  Otherwise, follow traditional Pmake behavior.
2008-03-12 14:51:47 +00:00
David E. O'Brien
ad9165a038 If the special target .MAKEFILEDEPS exists, then enable the
"remaking makefiles" feature.  Otherwise, follow traditional Pmake behavior.
(hash table will be regenerated and committed follow this commit)
2008-03-12 14:50:58 +00:00
Jeff Roberson
0f33b907d5 - Remove ksethrcmdname. 2008-03-12 11:51:01 +00:00
Peter Wemm
d60522eb39 Fix apparent typo. The permitted confidence values include 95%, not 85%. 2008-03-12 00:13:49 +00:00
Kai Wang
cb0dad38e4 GNU ar did NOT implment option -q as a synonym of -r as the manual
page stated, thus BSD ar(1) option -q, which was implemented based on
the GNU ar manual page, turns out to be incompatible with GNU ar -q.

This change will make BSD ar(1) -q a *REAL* GNU ar -q:

1. It will update symbol table. (same as unfixed version)
2. It will NOT compare new members spcified in the command line args
   with existing members, instead, append them directly.

Reported by:	  Johannes 5 Joemann <joemann@beefree.free.de>
Reported by:	  Timothy Bourke <timbob@bigpond.com>
Tested by:	  Johannes 5 Joemann <joemann@beefree.free.de>
Reviewed by:	  jkoshy
Approved by:	  jkoshy (mentor)
2008-03-11 18:35:51 +00:00
Joel Dahl
24ba015813 Fix minor typo. 2008-03-11 14:48:59 +00:00
Robert Watson
3c23548899 Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
its existing understanding that .tgz uncompresses to .tar.

MFC after:	3 days
PR:		121519
Submitted by:	Ighighi <ighighi at gmail.com>
2008-03-09 13:49:09 +00:00
Robert Watson
c7b65254c4 When gzipping to a target file, only set the source file flags on the
target file after the timestamp has been set; otherwise setting the
timestamp will fail if the flags don't permit it (i.e., uchg).

MFC after:	1 week
PR:		120208
Submitted by:	Ighighi <ighighi at gmail.com>
2008-03-09 11:16:42 +00:00
Felippe de Meirelles Motta
979690601e - Add my birthday entry
Approved by:	gabor (mentor)
2008-03-08 03:54:30 +00:00
Xin LI
18ebe77959 Merge revisions 1.10 and 1.11 from DragonFly:
- Use real getopt() handling instead of the hand-rolled and
   IOCCC-worthy "Micro getopt()" macros, plus clean up to the
   option handling code:
    * Sort the options in the switch statement;
    * Plug piddling memory leaks when processing repeated options
      by freeing strings before allocating them for a second time;
    * Die with a fatal error if the requested report file cannot
      be opened for appending;
    * Don't call init() before usage() (to prevent the usage
      message being mangled by changes to the terminal settings;)
 - Clean up the usage message, both in usage() and in the main
   program comment, both stylistically (sort and combine options)
   and for accuracy (following the manual page, make note of the -s
   and -S flags, and use the term 'send' instead of 'say' to reduce
   confusion (SAY is the name of a command for output to the user,
   not the connection.))

Obtained from:	DragonFly
2008-03-07 00:01:19 +00:00
Yaroslav Tykhiy
b9d442c148 The non-POSIX environment variable MAKE was superseded
by MAKEFLAGS ages ago, so don't mention it in comments.

Tested with:	cmp(1)
2008-03-05 20:24:38 +00:00
Yaroslav Tykhiy
0c35219978 Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset.  This means setting MAKEFLAGS to just an empty string
in the latter case.

If not doing so, make(1) behaved inconsistently WRT MAKEFLAGS.
In particular, it would let a `-f foo' option down to sub-makes
if .MAKEFLAGS was unset.  E.g.,

	env MAKEFLAGS="-f mymakefile" make

would pass `-f mymakefile' down to sub-makes via their environment
(unless mymakefile added something to .MAKEFLAGS).
But any additional options appearing would change this behaviour to
not passing `-f mymakefile' to sub-makes, as in:

	env MAKEFLAGS="-f mymakefile" make -D DUMMY

or

	env MAKEFLAGS="-f mymakefile -D DUMMY" make

(unless mymakefile cleared .MAKEFLAGS).

Also make(1) would leave MAKEFLAGS at its initial value if the
makefile set .MAKEFLAGS to an empty value.  I.e., it was impossible
to override MAKEFLAGS with an empty value.  (Note well that makefiles
are not to touch MAKEFLAGS directly, they alter .MAKEFLAGS instead.
So make(1) can filter out things such as -f when copying MAKEFLAGS
to .MAKEFLAGS at startup.  Direct modifications to MAKEFLAGS just go
nowhere.)

While the original intentions of the BSD make authors are somewhat
unclear here, the bug proves that NOT passing -f options down is
the settled behaviour because the opposite behaviour is totally
unreliable in the presence of any other options.  In addition, not
passing down -f's found in the environment is consistent with doing
so WRT the command line.

Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).

Submitted by:	ru (main.c)
Tested with:	make world
2008-03-05 20:11:04 +00:00
Jeff Roberson
7be5912e3f - Remove the -i argument when running a command to simplify things a
little bit and to prevent users from specifying a private mask that may
   later restrict other group changes.
 - Add a man page which brueffer generously contributed to.

Sponsored by:   Nokia
2008-03-05 02:10:43 +00:00
Jeff Roberson
73c40187fd - Verify that when a user supplies a mask that is bigger than the kernel
mask none of the upper bits are set.
 - Be more careful about enforcing the boundaries of masks and child sets.
 - Introduce a few more CPU_* macros for implementing these tests.
 - Change the cpusetsize argument to be bytes rather than bits to match
   other apis.

Sponsored by:	Nokia
2008-03-05 01:49:20 +00:00
David E. O'Brien
e6da40107e It seems some don't care for the anchient joke. Add WITHOUT_OLD_JOKE
to your CFLAGS if you fall into this camp.
2008-03-04 22:51:37 +00:00
David E. O'Brien
e3730a90c4 No need to tell make to DTRT with "make love", just do it.
Also remove the 2002/08/31 bootstrapping aid for upgrades from
year old (mid-2001) systems.
2008-03-04 22:32:58 +00:00
Warner Losh
d40ca10a58 <limits.h> is necessary for using INT_MIN, so included it here
explicitly rather than relying on name space pollution to pull it in
for us.

NB: The usage of INT_MIN is somewhat bogus and suspect to my eye, but this
commit doesn't address that issue.
2008-03-04 15:56:17 +00:00
Yaroslav Tykhiy
9966971b24 Move a stray paragraph on .Ev MAKEFLAGS to where it belongs. 2008-03-04 11:28:54 +00:00
Yaroslav Tykhiy
bfabc524aa Revise the description of how .Ev MAKEFILE and .Va .MAKEFILE relate.
The most important point is that -f option(s) are never copied from
.Ev MAKEFILE to .Va .MAKEFILE by make(1), which is consistent with
handling the command line.  (-f silently sit in .Ev MAKEFILE and go
to make's children unless overwritten via .Va .MAKEFILE)

Bump .Dd.
2008-03-04 11:25:23 +00:00
Yaroslav Tykhiy
ea5b47c61c Split descriptions of .Ev MAKEFILE and .Va .MAKEFLAGS for clarity. 2008-03-04 10:33:42 +00:00
Warner Losh
51f0bfca68 Note 7.0 was the first version that FreeBSD/pc98 had a MACHINE of pc98
instead of i386.
2008-03-04 06:08:59 +00:00
Warner Losh
db18a02be9 Linux requires -D__dead2= and -D__unused= to get rid of the
sys/cdef.h-isms in the make source.  The variant of linux I tried it
on doesn't have arc4random, so -Darc4random=random too.
2008-03-04 05:35:27 +00:00
Philippe Audeoud
385b7a146e - Add my birthday.
Approved by : thierry (co-mentor)
2008-03-03 13:14:39 +00:00
Ruslan Ermilov
dfab7fb13d Fix SYNOPSIS and usage(). 2008-03-03 08:32:58 +00:00
Tony Finch
6944dcc57a Typo in comment spotted by Hasso Tepper.
Obtained from: DragonFlyBSD
2008-03-02 22:27:49 +00:00
Jeff Roberson
bc72ba9cca - Add cpuset to the build.
Sponsored by:	Nokia
2008-03-02 07:52:26 +00:00
Jeff Roberson
0d985e498d Add a simple utility for manipulating cpusets. Man page will be available
soon.
 - Lists of cpus may be specified with -l with ranges specified as low-high and
   commas between individual cpus and ranges.  ie -l 0-2,4,6-8.
 - cpuset can modified -p pids, -t tids, or -s cpusetids.
 - cpuset can -g get the current mask for any of the above.

Sponsored by:	Nokia
2008-03-02 07:51:29 +00:00
Kai Wang
517dbe2e45 - Do not malloc buffer for 0-size member when reading from archive.
- Fix a malloc buffer overrun: Use a while loop to check whether
  the string buffer is big enough after resizing, since doubling
  once might not be enough when a very long member name or symbol
  name is provided.
- Fix typo.

Reported by:	Michael Plass <mfp49_freebsd@plass-family.net>
Tested by:	Michael Plass <mfp49_freebsd@plass-family.net>
Reviewed by:	jkoshy
Approved by:	jkoshy
2008-03-02 07:01:01 +00:00
Tony Finch
c1fe255f90 A fix for other ways of triggering joe@'s bug. 2008-02-29 13:19:50 +00:00
Tony Finch
25ce8d30ab Allow #if defined SYM as well as #if defined(SYM). Fix an abort
caused by files that have #endif and no newline on the last line
(reported by joe@). Also fix a benign uninitialized variable bug.
Update and tidy the copyright.
2008-02-29 12:57:14 +00:00
David E. O'Brien
62f261e751 Now that we're way past our conversion from GNU awk to BWK awk, we don't
need to primarily install as a non-conflicting name.
2008-02-28 16:41:51 +00:00
Ganbold Tsagaankhuu
6c1f51148a Add my birthday.
Approved by: keramida(mentor)
2008-02-27 07:39:31 +00:00
Pietro Cerutti
c93cf57f3d - Add my birthday
Approved by:	miwi (mentor)
2008-02-26 15:31:30 +00:00
Giorgos Keramidas
fe5628d3c1 Implement from scratch a -l option for du(1), to match the same option
of the GNU utility.  The default behavior of our original `du' is to
count hardlinked files only once for each invocation of the utility.
With the new -l option they count towards the final size every time
they are found.

PR:		bin/117944
Submitted by:	keramida
Reviewed by:	des, obrien
MFC after:	2 weeks
2008-02-25 19:06:43 +00:00
Ruslan Ermilov
d0ca999980 Make again BSD ar(1) the default system ar(1), now properly handling
source upgrades by falling back to GNU ar(1) as necessary.  Option
WITH_BSDAR is gone.  Option _WITH_GNUAR to aid in upgrades is *not*
supposed to be set by the user.

Stop bootstrapping BSD ar(1) on the next __FreeBSD_version bump, as
there are no known bugs in it.  Bump __FreeBSD_version to anticipate
this and to flag the switch to BSD ar(1), should it be needed for
something.

Input from:	obrien, des, kaiw
2008-02-25 16:16:17 +00:00
Ceri Davies
b390c31130 Bump .Dd for revisions 1.83 and 1.84. 2008-02-24 19:52:23 +00:00
Warner Losh
a66a6a2a0c Tag -ilname and -lname as GNU extensions.
Correct their descriptions to indicate that it is the contents of the
symbolic link that are matched.
2008-02-24 19:46:27 +00:00
Kai Wang
39358b4e6c style(9) whitespace fix: A space is mandated after keyword 'return'.
Submitted by:	    jkoshy
Approved by:	    jkoshy (mentor)
2008-02-24 18:30:17 +00:00
Kai Wang
a711c209bc Since the program is installed as 'bsdranlib', we need to
check if it is invoked as 'bsdranlib'.

Reported by:	Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Reviewed by:	Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Reviewed by:	jkoshy
Approved by:	jkoshy (mentor)
2008-02-24 18:07:46 +00:00
Kai Wang
47203048ab Handle properly when insert zero size objects into the archive:
Do not mmap 0-size objects and do not try to extract symbol from
0-size objects, but do treat 0-size objects as qualified objects and
accept them as an archive member. (A member with only the header part)

Note that GNU binutils ar on FreeBSD ignores 0-size objects, but on
Linux it accepts them. [1] But, since this is a rare usage, we can
safely ignore the compatibility issue.

Reported by:	Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Pointed out by: Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net> [1]
Reviewed by:	Michael Plass <mfp49_freebsd [AT] plass-family [DOT] net>
Reviewed by:	jkoshy
Approved by:	jkoshy (mentor)
2008-02-24 17:57:29 +00:00
Warner Losh
acebb585f7 The matching in -lname and -ilname are on the contents of the link
itself, not on the type of the file.  As such, do a readlink to get
the symbolic link's contents and fail to match if the path isn't a
symbolic link.

Pointed out by: des@
2008-02-24 00:01:06 +00:00
Warner Losh
46b993ff99 Implement a number of primaries present in GNU find, but not present
in our find.

The following are nops because they aren't relevant to our find:
	-ignore_readdir_race
	-noignore_readdir_race
	-noleaf
The following aliaes were created:
	-gid -> -group		[2]
	-uid -> -user		[2]
	-wholename -> -path
	-iwholename -> ipath
	-mount -> -xdev
	-d -> -depth		[1]
The following new primaries were created:
	-lname	like -name, but matches symbolic links only)
	-ilname like -lname but case insensitive
	-quit	exit(0)
	-samefile returns true for hard links to the specified file
	-true	Always true
I changed one primary to match GNU find since I think our use of it violates
POLA
	-false	Always false (was an alias for -not!)

Also, document the '+' modifier for -execdir, as well as all of the above.
This was previously implemented.

Document the remaining 7 primaries that are in GNU find, but aren't yet
implemented in find(1)

[1] This was done in GNU find for compatibility with FreeBSD, yet they
mixed up command line args and primary args.

[2] -uid/-gid in GNU find ONLY takes a numeric arg, but that arg does the
normal range thing that.  GNU find -user and -uid also take a numberic arg,
but don't do the range processing.  find(1) does both for -user and -group,
so making -uid and -gid aliases is compatible for all non-error cases used
in GNU find.  While not perfect emulation, this seems a reasonable thing
for us.
2008-02-23 16:29:04 +00:00
Christian Brueffer
8f74c2663b Fix typo. 2008-02-23 14:34:52 +00:00
Dag-Erling Smørgrav
60e15db992 This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payload
consists of the null-terminated name and the contents of any structure
you wish to record.  A new ktrstruct() function constructs and emits a
KTR_STRUCT record.  It is accompanied by convenience macros for struct
stat and struct sockaddr.

In kdump(1), KTR_STRUCT records are handled by a dispatcher function
that runs stringent sanity checks on its contents before handing it
over to individual decoding funtions for each type of structure.
Currently supported structures are struct stat and struct sockaddr for
the AF_INET, AF_INET6 and AF_UNIX families; support for AF_APPLETALK
and AF_IPX is present but disabled, as I am unable to test it properly.

Since 's' was already taken, the letter 't' is used by ktrace(1) to
enable KTR_STRUCT trace points, and in kdump(1) to enable their
decoding.

Derived from patches by Andrew Li <andrew2.li@citi.com>.

PR:		kern/117836
MFC after:	3 weeks
2008-02-23 01:01:49 +00:00
Ruslan Ermilov
ce04f76c56 Fix essential bugs and warnings. 2008-02-22 10:28:03 +00:00
Ruslan Ermilov
da9b9cd9dc Hide BSD ar(1) under the MK_TOOLCHAIN option.
Reviewed by:	obrien
2008-02-22 09:31:23 +00:00
David E. O'Brien
be1acc9caf Clean up created turds. 2008-02-22 06:53:52 +00:00
David E. O'Brien
18bbbf9ba4 We build important toolchain statically. So build BSD 'ar' statically
when its replacing GNU 'ar'.
2008-02-22 06:51:26 +00:00
David E. O'Brien
a856b6c56c Re-introduce the new BSDLed 'ar' to the build.
It is installed as "bsdar" unless WANT_BSDAR is defined.

Discussed with: kaiw
2008-02-22 06:47:45 +00:00
Ruslan Ermilov
a72d00742b Fix static linkage. 2008-02-21 16:29:52 +00:00
Kai Wang
7a76718800 Back out previous commit. Restore Binutils ar as default. Disconnect
'BSD' ar to the build.

Requested by: 	des
2008-02-21 16:12:46 +00:00
Kai Wang
d0e2abaf12 * Connect ar(1) to the build and make it default ar. Rename GNU
binutils ar and ranlib to gar and granlib, respectively.

* Introduce a temporary variable WITH_GNUAR as a safety net.
When buildworld with -DWITH_GNUAR, GNU binutils ar and ranlib
will install as default ones and 'BSD' ar will be disabled.

* Bump __FreeBSD_version to reflect the import of 'BSD' ar(1).

Approved by:		 jkoshy (mentor)
2008-02-21 11:21:29 +00:00
Kai Wang
d192f3d3c3 Import ar(1) front-end. (aka 'BSD' ar)
Reviewed by: 		jkoshy
Approved by:		jkoshy (mentor)
Tested by:		erwin (ports build test on pointyhat)
Sponsored by:		Google Summer of Code 2007
Reviewed by (earlier version): Jaakko Heinonen <jh[AT]saunalahti.fi>
Tested by (earlier version): Steve Kargl <sgk[AT]troutmask.apl.washington.edu>
Tested by (earlier version): Martin Voros <martin_voros[AT]yahoo.com>
Tested by (earlier version): swell.k[AT]gmail.com
Tested by (earlier version): joel
Tested by (earlier version): Alexey Shuvaev <shuvaev[AT]physik.uni-wuerzburg.de>
Tested by (earlier version): Arjan van Leeuwen <avleeuwen[AT]gmail.com>

Thanks to gabor@ for building ports for it.
Thanks to erwin@ and kris@ for scheduling the ports build test on pointyhat.
And thanks to many others for their feedback.
2008-02-21 10:52:31 +00:00
Ruslan Ermilov
b7498df286 getopt(3) returns -1, not EOF. 2008-02-19 07:09:19 +00:00
Tim Kientzle
2372ae680f Allow appending to archives on block devices as well as
archives in regular files, since both are seekable.

Thanks to: Reinoud Zandijk (@netbsd.org)
2008-02-19 05:27:17 +00:00
Edwin Groothuis
42d94d1358 remove Vette Dinsdag. It was on the wrong day of the week, and not really a term I'm familiar with. Of course this can happen since naming of events and happenings during Carnaval are very localized
Approved by: grog@
2008-02-18 07:09:17 +00:00
Mike Pritchard
df2725533a Make the human readable numbers printed with the -h option a bit
more human readable by telling the human print routines to use
a smaller buffer to format the value.

This makes it so a value that was previously being printed
as 600000K will now print as 586M.
2008-02-18 01:36:40 +00:00
John Baldwin
2e4760b66b Make netstat -rn more resilient to having the routing table change out from
under it while running.  Note that this is still not perfect:
- Try to do something intelligent if kvm_read() fails to read a routing
  table structure such as an rtentry, radix_node, or ifnet.
- Don't follow left and right node pointers in radix_nodes unless
  RNF_ACTIVE is set in rn_flags.  This avoids walking through freed
  radix_nodes.

MFC after:	1 week
2008-02-14 20:01:52 +00:00
Marius Strobl
8a0bd6b806 Change another argument and a variable both related to netname() to
be also 32-bit on all archs.

MFC after:	3 days
2008-02-11 20:34:27 +00:00
Yaroslav Tykhiy
cf99a6bebb Fix a few obvious errors in the znew(1) script.
PR:		bin/120249
Submitted by:	Jaakko Heinonen <see the PR for email>
2008-02-09 13:04:01 +00:00
David Malone
d3e5e11ce6 WARNS fixes:
1) Add missing parens around assignment that is compared to zero.
2) Make some variables that only take non-negative values unsigned.
3) Some casts/type changes to fix other constness warnings.
4) Make one variable a const char *.
5) Make sure termwidth is positive, it doesn't make sense for it to be negative.

Approved by:	dds
2008-02-09 09:12:02 +00:00
Joe Marcus Clarke
f280594937 Add support for displaying a process' current working directory, root
directory, and jail directory within procstat.  While this functionality
is available already in fstat, encapsulating it in the kern.proc.filedesc
sysctl makes it accessible without using kvm and thus without needing
elevated permissions.

The new procstat output looks like:

  PID COMM               FD T V FLAGS    REF  OFFSET PRO NAME
  76792 tcsh              cwd v d --------   -       - -   /usr/src
  76792 tcsh             root v d --------   -       - -   /
  76792 tcsh               15 v c rw------  16    9130 -   -
  76792 tcsh               16 v c rw------  16    9130 -   -
  76792 tcsh               17 v c rw------  16    9130 -   -
  76792 tcsh               18 v c rw------  16    9130 -   -
  76792 tcsh               19 v c rw------  16    9130 -   -

I am also bumping __FreeBSD_version for this as this new feature will be
used in at least one port.

Reviewed by:	rwatson
Approved by:	rwatson
2008-02-09 05:16:26 +00:00
Guy Helmer
8a4313c59c Fix truncation of lines at LINE_MAX characters by dynamically
extending line buffers.

PR:		bin/76578
2008-02-08 23:04:13 +00:00
David Malone
97ce0ae60f WARNS fixes: mainly constness and avoid comparing signed with
unsigned by making array indicies unsigned. Also note one or two
unused parameters.
2008-02-08 11:03:05 +00:00
David Malone
84eebcc257 WARNS fixes: remove two unused variables and add some constness. 2008-02-08 10:58:50 +00:00
Marius Strobl
bc784cfe1b Fix netname() [1] and routename() on big-endian LP64 archs.
Submitted by:	Yuri Pankov [1]
MFC after:	3 days
2008-02-07 23:00:40 +00:00
Antoine Brodin
9298b21daf Add my birthday.
Approved by:	rwatson (mentor)
2008-02-05 19:34:54 +00:00
David E. O'Brien
d870d44d20 Minor style(9) nit. 2008-02-05 17:34:44 +00:00
Dag-Erling Smørgrav
5fb6bed92c Revert CLEANDEPFILES commit per ru@'s request; it does not really solve
the problem.  The correct fix will follow.
2008-02-05 08:52:36 +00:00
Dag-Erling Smørgrav
0d7cc1d0eb Normally, when a header file is removed from the build (as i4b headers
were recently), a simple 'make cleandepend; make depend' is sufficient
to keep the tree buildable after a cvs update when doing incremental
builds.

However, kdump and truss use a script which searches for header files
that define ioctls, and generates C code that includes them.  This
script will usually not need updating when a header file is removed,
so the normal dependency mechanism will not realize that it needs to
be re-run.  One is therefore left with code that references dead files
but will only be removed by a full 'make clean', which defeats the
purpose of incremental builds.

To work around this, modify the cleandepend target in bsd.dep.mk to
also remove any files listed in a new variable named CLEANDEPFILES,
and modify kdump's and truss's Makefiles accordingly.

MFC after:	2 weeks
2008-02-03 11:34:56 +00:00
Dag-Erling Smørgrav
72d1e737b5 These are files are shell scripts; give smart editors a chance to figure
it out by adding the usual shebang.

MFC after:	2 weeks
2008-02-03 11:33:27 +00:00
Ruslan Ermilov
3aefeab5df Christos decided to keep the manpages in mdoc(7) format,
so stop using our own versions of these.
2008-01-30 12:56:59 +00:00
Xin LI
2f487fe4e4 Use calloc() when requesting zero'ed memory allocation rather than rolling
our own.
2008-01-29 00:06:44 +00:00
Giorgos Keramidas
86ca3fd005 Revive '-opt' flags which I accidentally removed.
Noticed by:	simon
2008-01-27 16:20:36 +00:00
Giorgos Keramidas
a502340a03 Document the no-op -r option of BSD xargs(1).
PR:		docs/106416
Submitted by:	Pete Slagle, freebsd-stable at voidcaptain.com
MFC after:	3 days
2008-01-26 12:38:19 +00:00
Ruslan Ermilov
47dd70868b Flag a hack. 2008-01-24 07:25:13 +00:00
Ruslan Ermilov
f0c2fb2d04 Style. 2008-01-24 07:24:30 +00:00
Tim Kientzle
97f576d0a4 Make -l always have the SUSv2 meaning of "check links."
GNU tar changed -l to match SUSv2 a couple of years ago,
so bsdtar no longer needs to pander to this particular GNUism.

Thanks to: Debian maintainers
MFC after: 7 days
2008-01-22 07:23:44 +00:00
Andrey A. Chernov
8d4b16f8bb Understand newly introduced "ASCII" encoding 2008-01-22 00:04:50 +00:00
Tom Rhodes
e322ed0f05 Note what options are only for DDS drives.
PR:	35608
2008-01-21 22:08:05 +00:00
Robert Watson
87cb56f6df When printing process file descriptor lists, show a type of 'h' for
POSIX shared memory descriptors.
2008-01-20 19:57:33 +00:00
Peter Wemm
248e52ada8 Fix some boolean logic errors. && vs & and other sillyness. *blush*
This would prevent it from skipping non-present cpus in -P output.

Submitted by:  Pieter de Goeje <pieter@degoeje.nl>
2008-01-18 22:09:44 +00:00
Peter Wemm
031175705e Add a -P flag to display per-cpu cpu usage stats. 2008-01-18 01:43:14 +00:00
Xin LI
93b9f50404 ANSIfy and remove register.
Resulting binary verified with strip(1)+md5(1).
2008-01-16 19:27:43 +00:00
David Schultz
3c58f6ddbd Fix some bugs in wall(1):
- Handle wrapping correctly when \r appears in the input, and don't
  remove the \r from the output.
- For lines longer than 79 characters, don't drop every 80th character.
- Style: Braces around compound while statement.

PR:		114498
Submitted by:	Niclas Zeising <niclas.zeising@gmail.com> (earlier version)
2008-01-15 07:40:30 +00:00
David E. O'Brien
ef19c627f8 Update for the 'file' 4.23 import. 2008-01-13 20:37:19 +00:00
Xin LI
5abb148f43 - Handle the case where interface from "middle" is missing by
more carefully inspecting the return value from sysctl(3). [1]
 - Use calloc instead of malloc+memset of zero.

Submitted by:	Alexander Chernikov <admin su29 net> [1]
PR:		bin/119581
MFC after:	2 weeks
2008-01-12 00:11:26 +00:00
Andrew Thompson
a3ab9923ff Add IFT_BRIDGE to the Ethernet section so l2 addresses are formatted correctly.
PR:		bin/119542
Submitted by:	Niki Denev
2008-01-10 20:53:13 +00:00
Sam Leffler
7627e00431 quiet compiler complaint about unused parameters 2008-01-10 04:28:26 +00:00
David E. O'Brien
dbb2956620 Improve -u (limit uid lookups) behavior.
Submitted by:	David Frascone <dave@frascone.com>
PR:		119490
2008-01-09 18:06:24 +00:00
Dag-Erling Smørgrav
497a8b25b5 Welcome unzip(1), a pure BSD drop-in replacement for ports/unzip. In its
current state, it can handle all but four of the 991 zip files (including
jar files) I was able to identify in the ports tree.  The remaining four
are two self-extracting archives and two which have garbage preceding the
first local header.  This limitation is a feature of libarchive(3) which
I am currently working to resolve.

The code is unnecessarily large due to the need to emulate the exact
command-line syntax and behaviour of ports/unzip.  My initial incompatible
implementation was one quarter the size of the one I am committing here.
2008-01-08 08:00:06 +00:00
John Baldwin
0460d3516d Only use sockoptname() to parse socket option names for SOL_SOCKET
requests.

MFC after:	3 days
Reported by:	Michiel Boland  michiel boland.org
2008-01-07 18:50:25 +00:00
David E. O'Brien
bc215f5905 Make a few messages more consistant with the others. 2008-01-04 03:09:28 +00:00
David E. O'Brien
3feeb33206 more style(9) 2008-01-04 03:08:49 +00:00