Commit Graph

1038 Commits

Author SHA1 Message Date
Andrey A. Chernov
441e1d5cb8 Describe drainwait 2000-04-27 22:08:29 +00:00
Andrey A. Chernov
b2953dfa7d part of gfmt really changed commit 2000-04-27 21:48:48 +00:00
Andrey A. Chernov
18430c2095 gfmt: set 'changed' flags only if something really changed. 2000-04-27 21:45:41 +00:00
Andrey A. Chernov
d0834e7f9d Add ability to manipulate with drain wait time 2000-04-27 21:31:23 +00:00
Andrey A. Chernov
be2c49b193 Activate ja nls if WANT_KANJI
Fix 'make release'
Suppress 'make distribute'
2000-04-24 08:14:16 +00:00
David E. O'Brien
c22ae8f672 Pass "WANT_KANJI" from make.conf to the compiler. 2000-04-23 18:08:49 +00:00
David E. O'Brien
58a09c5f58 MBYTEDEBUG not needed for "WANT_KANJI"
Submitted by:	Hajimu UMEMOTO <ume@mahoroba.org>
2000-04-23 18:08:10 +00:00
David E. O'Brien
8a5e48368a Until it's impact is better understood, only active KANJI/DSPMBYTE/MBYTEDEBUG
if "WANT_KANJI" is defined in /etc/make.conf.

Submitted by:	Hajimu UMEMOTO <ume@mahoroba.org>
2000-04-21 18:45:06 +00:00
Andrey A. Chernov
428a34d8ec Fix 'make distribute' 2000-04-21 12:34:41 +00:00
Andrey A. Chernov
75603ec101 Disable ja NLS until clarifying what needed else to support it 2000-04-21 10:14:09 +00:00
Martin Cracauer
d62ec71c31 Rename the trace() function (that is build only in the -DDEBUG=2
case), so that it doesn't clash with the ncurses function of the same
name when linking statically with -ltermcap.

The linker only complains when -static is used, and it is not clear
whether this is a bug.

PR:		bin/18104
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
2000-04-20 11:39:11 +00:00
Martin Cracauer
e988388eff Include <errno.h> when compiling with -DDEBUG=2
PR:		bin/18104
Submitted by:	mellon@pobox.com
2000-04-20 09:55:57 +00:00
Martin Cracauer
f01e3d0cfe Fix warnings, some of them serious because sh violated name
spaces reserved by the header files it includes.

mkinit.c still produces C code with redundant declarations, although
they are more harmless since they automatically derived from the right
places.
2000-04-20 09:49:16 +00:00
Andrey A. Chernov
43cf5ff9b4 Activate NLS.
Optimize NLS by not wasting space copying the same .cat but use symbolic links
instead.
2000-04-20 08:58:11 +00:00
Andrey A. Chernov
491a30c968 Activate finnish set 2000-04-20 07:08:43 +00:00
David E. O'Brien
386c7e9f4e Add NLS files. Finish and Greek are WIPs.
Submitted by:	ache
2000-04-20 06:50:23 +00:00
David E. O'Brien
585dfedb38 Use our system malloc(). 2000-04-19 15:15:44 +00:00
David E. O'Brien
77f2a34fb1 Install /bin/tcsh also. 2000-04-19 15:15:19 +00:00
David E. O'Brien
325c70b76a Upgrade csh. 2000-04-18 07:31:36 +00:00
David E. O'Brien
bcf88e07f6 Add a NO_TCSH knob. 2000-04-17 20:32:13 +00:00
Jeroen Ruigrok van der Werven
2192b407ac Sync us up to OpenBSD's cat.1 v1.18 and cat.c v1.9.
This gets rid of a bogus cast of NULL in setbuf().
Lets us know the buffer malloc failed.

Reworks the manpage a bit to make it more mdoc(7) compliant, adds
examples.
2000-04-14 21:01:35 +00:00
Warner Losh
fba0ed115e Use #include <errno.h> rather than extern int errno;. 2000-04-14 06:03:39 +00:00
Jeroen Ruigrok van der Werven
347b695801 Remove unnecessary empty line.
Remove trailing whitespace.
2000-04-13 19:31:46 +00:00
Brian Somers
9263db41f6 Change -v so that variences in units of days or less are sensitive to
DST.  Explain in more detail what date -v does when mixed with DST.

Previous code suggested broken by: wollman
2000-04-12 13:35:17 +00:00
Brian Somers
a625bfec63 Always give mktime a timeval with tm_isdst set to -1, otherwise
things get a bit out-of-phase when we step backwards 1 hour from
between 0:00 and 1:00 on the first of the month following the
transition into Summer time.  This is probably actually a bug
in mktime().

PR:	10963

If mktime() fails and 68 < year < 138, assume that the reason is
because of Summer time and adjust up or down according to our
adjusting context by one hour.  This assumes that all DSTs are
multiples of 1 hour.

PR:	6223, 17750
2000-04-05 01:59:36 +00:00
Bruce Evans
508424d139 Fixed prototype for setflags(). setflags() returns int, not u_long,
and "extern" in function prototypes is a style bug.  The type mismatch
broke chflags(1) on i386's with 64-bit longs and may have broken it on
alphas.
2000-04-04 14:12:35 +00:00
John Polstra
ec9247d53e Document that the flags can be specified as an octal number. 2000-04-03 22:10:58 +00:00
Bruce Evans
5ebae837e1 Fixed LDADD. Using ${LIBM} instead of -lm gave the wrong libm in most
cases and broke the world in some cases.

Fixed some style bugs (the usual ones for DPADD and LDADD, misplacement
of DPADD and LDADD, and misplacement of $FreeBSD$).
2000-03-27 14:53:26 +00:00
Sheldon Hearn
8d230e25ae Correct confusing description of the -r option.
PR:		17250
Submitted by:	cjclark@home.com (Crist J. Clark)
2000-03-07 20:54:17 +00:00
Sheldon Hearn
e84d092b81 Revert the previous commit. I knew I should leave non-mdoc stuff alone. 2000-03-03 09:53:52 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Sheldon Hearn
f63f700eea Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 11:34:08 +00:00
Sheldon Hearn
bef84d6bc0 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 10:43:09 +00:00
Brian Feldman
6be607d0d5 After Bruce kindly explained the whole groff "sentence" idea to me, I've
put the whitespace in the right place.
2000-03-01 05:28:45 +00:00
Mark Murray
e1a456f0e4 Change DISTRIBUTION name to match reality. 2000-02-29 11:39:24 +00:00
Brian Feldman
c107f9e04f Fix style bugs I introduced in the last revision.
Brucified by:	bde
2000-02-27 16:40:39 +00:00
Brian Feldman
a6d413e7f8 Add iseek= and oseek= aliases for the preexisting skip= and seek=
operands.  Can _YOU_ tell skip= and seek= apart with 100% accuracy
every time?

This also seems to make us option-for-option compatible with the
Solaris dd(1).

Approved by:	jkh
Suggested by:	peter
2000-02-26 21:29:44 +00:00
Mark Murray
96ccf174ec Use libcrypto inst=ead if libdes. 2000-02-24 21:21:15 +00:00
Alfred Perlstein
3b006d8ebd Re-add "May" to the list of dates supported.
Approved by: jkh
2000-02-18 23:41:45 +00:00
Gregory Sutter
276d5ee851 Reflect that dd accepts octal and hexadecimal numbers (in addition to decimal).
PR:		16750
Submitted by:	Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-02-18 04:55:40 +00:00
Bill Swingle
4e6f6ed936 From the PR:
The description of -X option in csh(1) manpage uses a wording
  that references the descriptions of -x, -v and -V.  This might
  be a little confusing.  Changed this to a complete description
  that does not reference other paragraphs.

PR:		16762
Submitted:	Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-02-17 03:40:21 +00:00
Bill Swingle
f54042f93f From the PR:
The first paragraph of "Argument list processing" says that an
  argument of - will make csh be a login shell.  However, running
  csh with only a - as an argument fails with the error message.

csh(1) corrected to reflect this.

PR:		16754
Submitted by:	Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-02-17 03:23:39 +00:00
Bill Swingle
aa387b2d8c From the PR:
Three minor changes to the manpage of chmod(1).

  1. At the description of -H option, I added that symlinks are
  not followed _by default_ to show that links can be followed,
  but the default chmod behavior is not to do so.

  2. Moved a misplaced .Va file command up to the place it belongs.

  3. Simplified the grammar that describes symbolic modes.

PR:		16749
Submitted by:	Giorgos Keramidas <keramida@ceid.upatras.gr>
2000-02-17 03:17:03 +00:00
Martin Cracauer
c11e75cfcf Fix ${#varname} (getting length of string) when in double-quotes.
Approved-by:	jkh

PR:		bin/12137
Submitted by:	"Danny J. Zerkel" <dzerkel@columbus.rr.com>
2000-02-15 08:00:11 +00:00
Josef Karthauser
418d67b0d9 Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process.  It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved:	jkh
2000-02-05 18:42:36 +00:00
Peter Wemm
8687e09584 Don't report the tablet line discipline, it "doesn't happen (TM)" 2000-01-29 16:44:08 +00:00
Josef Karthauser
18c0eeddf7 Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'.  As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.

Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.

There are two already existing libc functions for manipulating file
modes:  setmode and getmode.  In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.

The manual page could probably be improved upon ;)
2000-01-27 21:17:01 +00:00
Michael Haro
127432d7e2 fix cp -vi bug
Submitted by:	Dan Papasian (bugg_ on irc)
2000-01-23 03:04:49 +00:00
Brian Somers
94a64a491a Fix various mandoc bugs 2000-01-12 00:29:16 +00:00
Alexey Zelkin
daa40efd8c Add `.Nm red' to NAME section. 2000-01-10 12:20:30 +00:00
Alexey Zelkin
4df223aaf6 . mdoc(7)'fy
. add Xrs to hosts.equiv(5), auth.conf(5), services(5) to some pages
. sort Xrs in SEE ALSO sections

Patches based on PR:	docs/15680
Submitted by:		Christian Weisgerber <naddy@mips.rhein-neckar.de>
2000-01-07 13:14:32 +00:00
Bruce Evans
029b2bd09e Print negative minor numbers in hex. Negative minor numbers are
essentially large unsigned ones, and we already print minor
numbers > 255 in hex.
2000-01-06 14:40:10 +00:00
Bruce Evans
ed92ab90fc Actually remove unrequired SRCS. 2000-01-05 19:22:10 +00:00
Josef Karthauser
cd2a718f1e Added missing DPADD's. Removed unrequired SRCS's.
Obtained from:	bde
2000-01-01 15:44:11 +00:00
Josef Karthauser
6a9a6f05ed Removed bogus dependancy on libutil.
Noticed by:	bde
2000-01-01 15:40:40 +00:00
Josef Karthauser
51eb98b5a8 Retire stat_flags.c; it's now in libutil. 1999-12-30 13:23:34 +00:00
Josef Karthauser
edc2844c9f Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.
1999-12-30 13:15:15 +00:00
Sheldon Hearn
a82111c306 Back out previous commit and replace with a cleaner solution adapted
from the source attributed below.  In particular, this removes a goto
inside a switch and replaces those horrendous ATOI macros with
something acceptable.

More clean-ups to come.

PR:		bin/14151
Reported by:	Christian Weisgerber <naddy@mips.rhein-neckar.de>
Obtained from:	NetBSD
1999-12-29 16:50:08 +00:00
Sheldon Hearn
9abf30435b Take into account the fact that "[" may be called with a path,
for example "/bin/[".

Reported by:	Vlad Skvortsov <vss@ulstu.ru>
Reported by:	Peter Jeremy <peter.jeremy@alcatel.com.au>
Message-Id:	99Dec27.111307est.40321@border.alcanet.com.au
1999-12-28 09:34:57 +00:00
John Baldwin
b6c1f94fde Mention the hostname variable in /etc/rc.conf since that is the most
common way of setting the hostname.  The man page already mentioned that
the hostname is set by /etc/rc.network, so this just explains where
/etc/rc.network gets the hostname from.

PR:		docs/14319
Submitted by:	rwatson
Reviewed by:	cmc
1999-12-22 01:28:49 +00:00
Ollivier Robert
aa50282cd1 Fix a bug where a pointer would be one character too far after putting
a '\0' at the end of a string.

Submitted by:	Martin Birgmeier <Martin.Birgmeier@aon.at>
1999-12-21 10:17:36 +00:00
Sheldon Hearn
9a73cc73e9 Fix cut'n'paste niggles in previous commit. 1999-12-21 08:57:58 +00:00
Sheldon Hearn
d71e172ac6 Add link(1) and unlink(1) as special cases of ln(1) and rm(1)
respectively, in accordance with SUSv2.

This differs from the approach taken in NetBSD, but provides
less obscure error messages in at least the EISDIR case and
does not take up additional disk space for new binaries.

PR:		13071
PR:		13074
Requested by:	James Howard <howardjp@wam.umd.edu>
1999-12-20 16:13:47 +00:00
Martin Cracauer
a436dc79f5 Fix command hash handling on
PATH=... command

Noted by and fix works for Marcel Moolenaar <marcel@scc.nl>
1999-12-20 13:42:59 +00:00
Ollivier Robert
27d5775d8c Rewriting of flags_to_string() and string_to_flags() to use an array.
PR:		bin/3648
Submitted by:	Martin Birgmeier <mbirg@austria.ds.philips.com>
1999-12-19 15:31:24 +00:00
Martin Cracauer
2dde9ce37a Second part of 8-bit fixes. 1999-12-16 12:03:46 +00:00
Martin Cracauer
3652a236fa Document ulimit -b for RLIMIT_SBSIZE. 1999-12-15 16:12:32 +00:00
Martin Cracauer
73f612b50d First round of 8-bit fixes. 1999-12-15 11:46:32 +00:00
Michael Haro
dd6d33e86e add human readable output (-h and -H)
Obtained from:	parts of human readable code from OpenBSD
Reviewed by:	obrien

add POSIX, byte and megabyte block size ouput flags

PR:		13579 (POSIX flag)
Submitted by:	Mike Meyer <mwm@phone.net>
1999-12-15 03:44:09 +00:00
Brian Feldman
dd92370286 I've been Brucified! I did evil things with typedefs, but I'll do it
the correct (but less aesthetic) way, now.  New lesson: correctness
and aestheticity may be mutually exclusive at times.

Brucified by:	bde
1999-12-08 02:44:46 +00:00
Brian Feldman
67f80d12af Do proper constification in args.c. This shuts up -Wcast-qual (thanks,
bfumerola for that pointer!) in GCC complaining about losing a const.

While I'm here, might as well mark in the Makefile that I'm the
${MAINTAINER}.  It seems like that's what everyone's doing these days.
1999-12-07 03:32:37 +00:00
Martin Cracauer
671356079b make '|' character visible.
PR:		docs/15265
Submitted by:	takamune@avrl.mei.co.jp
1999-12-05 12:13:54 +00:00
Martin Cracauer
e92feeebb1 Fix "subscript has type `char'" warnings by casting to int, as
discussed on -arch.
1999-12-04 17:12:47 +00:00
Martin Cracauer
6c48b6cf75 Include strerror(errno) in error messages after failed system calls.
Fix a warning.
1999-11-29 19:11:01 +00:00
David E. O'Brien
a082153a1f Default to not -v.
Fix usage() style bug spotted by BDE.
1999-11-28 12:24:16 +00:00
Michael Haro
0efa204039 brucify
Reviewed by:	obrien
1999-11-28 09:34:21 +00:00
David E. O'Brien
5bb83b98db Add "-v". 1999-11-27 19:25:08 +00:00
Philippe Charnier
dd562b0ebb Correct use of .Nm. Add DIAGNOSTICS section. Add rcsid 1999-11-21 16:11:56 +00:00
Sheldon Hearn
e918fc8f72 Follow-up on mdoc fixes in rev 1.35; this includes things that I missed
in that revision as well as things I broke in that revision.  A note-
worthy instance of the latter case was the inversion of -E and -V in the
subsection on Commandline Editing.
1999-11-18 08:13:21 +00:00
Martin Cracauer
6d9efc2432 The pipleline problem introduced in version 1.22 wasn't fully fixed in
1.23. This revision should work for long pipes both in
here-documents/backquote and in normal cases.

Fix works for jmz, bde.
1999-11-17 16:53:34 +00:00
Peter Wemm
821079e9be I'm probably jumping the gun, but what the heck, this is -current.
Turn off setgid-kmem for /bin/ps, it's now quite functional without it.
ps no longer needs /dev/*mem or /proc.  (It will still use some /proc
files if they are available for -e, but it's not required, so it'll
happily run in a jail or chroot).

The proc stats are now part of eproc (obtained via sysctl) and no longer
needs to beat up the u-page reading code and the problems with that.

This also has the side effect of disabling 'ps -e' for normal users
*EXCEPT* when looking at their own processes.  ie: they can see
environments in processes with their uid, enforced by the ownership of
/proc/*/mem.  Root can still see them all, as it can open all /proc/*/mem.
1999-11-17 13:37:30 +00:00
Peter Wemm
602a69d61e Use eproc.e_stats, not a series of crude hacks to fetch it from the u-area.
Also, fix some indentation that got messed up somehow..
1999-11-17 12:52:42 +00:00
Poul-Henning Kamp
b9df5231ca Introduce commandline caching in the kernel.
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.

To disable this facility and revert to previous behaviour:
        sysctl -w kern.ps_arg_cache_limit=0

For full details see the current@FreeBSD.org mail-archives.
1999-11-16 20:31:58 +00:00
Kris Kennaway
bdfebd8480 Typo (appropiate -> appropriate)
Obtained from:	OpenBSD (inspired by)
1999-11-15 03:37:57 +00:00
Sheldon Hearn
646e0924a1 Allow the year to be specified with an optional century.
PR:	14472
Reported by:	j_guojun@lbl.gov (Jin Guojun)
1999-11-10 13:34:39 +00:00
Sheldon Hearn
150c3a33b9 Don't call bash(1) a Korn shell clone. Instead, use pdksh(1) as an
example of such a clone.

PR:		14601
Submitted by:	Matthias Buelow <mkb@altair.mayn.de>
1999-11-10 13:27:54 +00:00
Steve Price
6edf2a5be8 Correct logic from previous commit - middle processes in long pipes
don't have their stdin closed indisciminantly.

Reviewed by:	markm
1999-11-07 17:07:05 +00:00
Martin Cracauer
74eeb719fd When a backquote command inside a here-document had a pipe with more
than two processes (got that? :-), the stdin fd of the middle
processes that has just been set up was accidetially closed. Don't do
this.

PR:		bin/14527
1999-11-05 12:06:30 +00:00
Julian Elischer
5b42dac8ec Most modern OSs have the ability to flag certain mounts as ones to
be ignored by default by the df(1) program.  This is used mostly to
avoid stat()-ing entries that do not represent "real" disk mount
points (such as those made by an automounter such as amd.)  It is
also useful not to have to stat() these entries because it takes
longer to report them that for other file systems, being that these
mount points are served by a user-level file server and resulting in
several context switches.  Worse, if the automounter is down
unexpectedly, a causal df(1) will hang in an interruptible way.

PR:		kern/9764
Submitted by:	Erez Zadok <ezk@cs.columbia.edu>
1999-11-01 04:57:43 +00:00
Ruslan Ermilov
22307be5c9 Restore reference to sleep(3). 1999-10-28 17:41:33 +00:00
Martin Cracauer
905f2e447b Fix ';' command when used with -e flag.
PR:		bin/14509
1999-10-26 13:17:18 +00:00
David E. O'Brien
64cfb0f130 Add `n' to the synopsis.
Forgotten by:	sheldonh
1999-10-16 16:17:54 +00:00
Brian Feldman
7cde774d15 Implement ulimit -b for RLIMIT_SBSIZE. 1999-10-09 20:56:06 +00:00
Brian Feldman
6b3ced11a2 This implements the RLIMIT_SBSIZE ("sbsize") administrative limits for
userland.  Currently, it can be enforced by login and csh.  More
shells supporting sbsize are welcome.
1999-10-09 20:47:59 +00:00
Sheldon Hearn
49e11e3a66 Mdoc cleanup, with a few grammar cleanups on the side.
Reviewed by:	mpp
1999-10-07 13:56:43 +00:00
Brian Feldman
bf3367d091 Nuke the FIODTYPE compatibility bits. It's time. 1999-10-03 18:49:51 +00:00
Ruslan Ermilov
ac14c3115f Let sleep(1) handle fractions of a second (up to nanosecond).
This is a conservative change.  It does the same thing in weird
cases like the old one.  For example, 'sleep abcd' still sleeps
for zero seconds.  `sleep 10.a' and `sleep 10.05aa' do the best
and not abort (ie: 10.a == 10 seconds, 10.05a == 10.05 seconds).
1999-10-01 07:53:40 +00:00
Mark Murray
69746547bd Fix for new Kerberos4. 1999-09-19 22:11:15 +00:00
Brian Feldman
5ff6541e7a Make count=0 set cpy_cnt to -1, which is slight overloading, but makes
what I was trying to do work much better (ie at all.  I could have sworn
it was working...) Fix a SEEK_SET to be SEEK_CUR, and make Bruce's
lseek() test work correctly.
1999-09-16 19:50:59 +00:00
Brian Feldman
1838cf5671 Let count=-something fail, while count=0 may succeed, thus making dd(1)
useful as a seeking-tool as well as its many other uses.  Previously,
dd(1) would succeed with count=0, but wouldn't get to the point that
blocks were to be read/written. This is a more useful behavior, and
this specific case doesn't seem to be handled by POSIX.
1999-09-16 05:12:59 +00:00
Sheldon Hearn
e6d3cf2648 Correct some hard sentence breaks. Only those surrounding the previous
commit and those which cause ugly nroff output have been fixed, since
the purpose of the style guideline which they contravene is to reduce
the sizes of deltas.

Reported by:	bde
1999-09-14 11:46:04 +00:00
Brian Feldman
7599187e0d Even more dd(1) cleanups! Thanks to Bruce for staying on my case until
we're done (not yet!) :)
1999-09-13 21:47:10 +00:00
Alexey Zelkin
980bb531d7 Fix SEE ALSO section:
. add printenv(1)
. correct reference to "CSH introduction"

Reviewed by:	mpp
1999-09-13 19:16:47 +00:00
Bruce Evans
4a086b52ca Fixed longstanding breakage of rm of deep directories in rev.1.2.
rm must not use FTS_NOCHDIR, since chdir'ing is required for removing
deep directory trees and the ability to remove such trees is required
by POSIX.2 and POLA.  The breakage didn't make much difference until
recently, since fts(3) didn't work in deep directory trees.  It isn't
clear whether using FTS_NOCHDIR ever fixed anything (Net/2's rm.c is
similar to Lite1's).  Perhaps it was actually to limit the damage
caused by the fts bug.
1999-09-13 15:12:30 +00:00
Brian Feldman
32952d4b37 ISDISK -> ISSEEK
Allow a device type of D_DISK or D_MEM to be ISSEEK.
1999-09-12 18:56:12 +00:00
Brian Feldman
5868747254 Even more cleanups to dd(1). This is probably the culmination of the
BDEification process of dd(1). Most of the changes are from BDE's archive.
Support for negative offsets is gone again, but the case where you
lseek() onto byte -1 of something from a negative offset using seek/skip
is fixed; if you end up on -1, you won't get a false positive lseek failure.
  The biggest changes are to data types (more size_t, for instance) and
argument parsing. skip/seek on /dev/{,k}mem now occurs (instead of "read
until you reach the offset") due to mem devices now being D_DISK. Some
const things are now correctly declared as such, and the "case table"
building is better. The only thing that seems to be left to make dd(1)
everything TOG wants it to be is l10n.
1999-09-12 16:51:53 +00:00
David E. O'Brien
b598b07322 Add verbose processing flag. 1999-09-11 10:06:56 +00:00
Brian Feldman
e14f7e789a Make a bit more headway with dd's argument parsing, etc. get_bsz() is
renamed get_num() since it's not just about block sizes. skip and
seek can be any offset, including negative, now. Some style bogons are fixed.
1999-09-11 00:02:42 +00:00
Sheldon Hearn
c644db6aa2 Improve shell documentation:
* Consistently misspell built-in as builtin.

* Add a builtin(1) manpage and create builtin(1) MLINKS for all shell
  builtin commands for which no standalone utility exists.  These MLINKS
  replace those that were created for csh(1).

* Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages,
  as well as to the manpages of standalone utilities which are supported
  as shell builtin commands in at least one of the shells. In such
  manpages, explain that similar functionality may be provided as a
  shell builtin command.

* Improve sh(1)'s description of the cd builtin command. Csh(1) already
  describes it adequately. Replace the cd(1) manpage with a builtin(1)
  MLINKS link.

* Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use
  Ic instead of Xr for shell builtin commands.

* Undo English contractions.

Reviewed by:	mpp, rgrimes
1999-09-08 15:40:46 +00:00
Michael Haro
777d1f8281 brucify, v' before W', mention -v is non-standard in manpage and
make code slightly easier to read

Reviewed by:	obrien
1999-09-04 03:40:10 +00:00
Michael Haro
234c2f5b6e mention that -v is non-standard
Reviewed-by:	obrien
1999-09-04 03:33:18 +00:00
Michael Haro
2f5f84c566 brucify and add comment about -v being non-standard to manpage
Reviewed by:	obrien
1999-09-04 03:19:38 +00:00
Sheldon Hearn
ccbd308159 Revert to using .Xr for builtins. The cross-references don't work now,
but that doesn't mean that they will never work.

Requested by:	mpp, rgrimes
1999-08-31 12:44:52 +00:00
Sheldon Hearn
6b15476ec9 Clean-up:
Fix grammar and spelling nits.
	Use .Dq and .Qq where appropriate.
	Divorce trailing punctuation from quoted elements.
	Use .Dq instead of .Xr for builtins.
	Remove trailing whitespace and blank lines.

PR:	13340
1999-08-30 10:13:04 +00:00
Bruce Evans
158562983e Yet another previously forgotten merge from Lite2. (Describe
`opaque', fix reversed description of `nodump', and don't use
`nodump' as an example of adding a `no' prefix since the double
negative would be confusing (it's still confusing -- the implicitly
documented `nonodump' flag doesn't exist).)
1999-08-30 03:40:26 +00:00
Michael Haro
0b93733576 fix rm -r
Submitted by:	John Hay -- John.Hay@mikom.csir.co.za
1999-08-29 19:57:03 +00:00
Michael Haro
46fedeb096 add verbose flag 1999-08-29 08:21:16 +00:00
Michael Haro
fcb2f1b389 brucify and move printf() to catch cases of special files 1999-08-29 07:58:19 +00:00
Michael Haro
bfbdd545e1 add verbose flag
exit(1) --> exit(EX_USAGE)

Reviewed by:	obrien
1999-08-29 02:20:26 +00:00
Mike Pritchard
d3183183c2 Fix typo in previous commit that documented the -v option. 1999-08-28 21:38:36 +00:00
Michael Haro
1df89a603d add verbose flag
Reviewed by:	obrien
1999-08-28 20:46:00 +00:00
Brian Feldman
ff8bb989ab Relax things a bit. Not having FIODTYPE will be a warning for now.
Pointy hat:	green
Pointed out by:	peter
1999-08-28 03:37:38 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Brian Feldman
e08d7384ee Use FIODTYPE to unbogosify much of the file type checking in dd. 1999-08-27 16:36:46 +00:00
Sheldon Hearn
b84897d106 Don't suggest sysctl(8) as a means for discovering what filesystem types
are available; suggest lsvfs(1) instead.

Reported by:	Neil Blakey-Milner <nbm@rucus.ru.ac.za>
1999-08-26 16:47:03 +00:00
Thomas Gellekum
8f0561cc42 Make the behaviour of `read -e', ie. treating backslashes as special,
the default. Add -r option for the read builtin to reverse this.

PR:		13274
Reviewed by:	cpiazza, hoek, sheldonh
1999-08-26 08:16:27 +00:00
Michael Haro
4506e9078e Add a verbose mode to show what files are being copied.
Idea taken from obrien.

Reviewed by:	obrien
1999-08-26 02:44:56 +00:00
Jordan K. Hubbard
9efde83904 Remove obsolete BUGS section which describes something which stopped
being relevant when we ripped out the BSD/VAX code.

Submitted by:	Guy Harris <gharris@flashcom.net>
1999-08-25 14:38:58 +00:00
Chris Costello
a84e119fe0 Sort cross-references. Move mount(8) down the list where it belongs, in
particular.
1999-08-25 08:45:31 +00:00
Brian Feldman
2a6d85a9cb Make the comments nice, short-but-sweet XXX format.
Submitted by:	sheldonh
1999-08-24 06:10:14 +00:00
Chris Costello
279fdba6f6 Backed out my -n change to imply -l by request of sheldonh. 1999-08-23 05:39:40 +00:00
Chris Costello
c9392e0135 Make -n flag compliant to the Single Unix Specification.
To quote their ls(1) specification:

   -n
          The same as -l, except that the owner's UID and GID numbers are
          written, rather than the associated character strings.

Reviewed by:	green
1999-08-23 01:17:58 +00:00
Brian Feldman
0337663160 Make a comment I added a bit nicer. 1999-08-22 22:32:41 +00:00
Brian Feldman
d2fed466ac Finally: fix test -x as completely as possible.
Reviewed by: bde
Reworked by: bde
1999-08-20 16:19:26 +00:00
Sheldon Hearn
1f94b77952 Take integer rounding into account in the buffer size approximation
macro. So now it's (1 +) for the sign and (+ 1) for rounding.

Reported by:	bde
1999-08-19 13:04:08 +00:00
Sheldon Hearn
008a491079 Style issues in previous commit:
Use an upward approximation of the number of characters required
        for decimal representations of uid_t, gid_t and u_quad_t, intead
	of arbitrary values that may not be safe in the future.

	Fix disordering.

Requested by:	bde
1999-08-19 11:36:12 +00:00
Brian Feldman
eb5e5558e9 The new test(1) did not use access() correctly. I don't know why, since
supposedly it's ksh-derived, and it's not broken in pdksh. I've added
a test for test running as root: if testing for -x, the file must be
mode & 0111 to get "success", rather than just existant.

Reviewed by:	chris
1999-08-18 00:18:52 +00:00
Ruslan Ermilov
64373ec6f7 Describe proper signals behavior rather than just removing it.
Remove obsoleted reference to alarm(3).

Submitted by:	bde
1999-08-16 12:36:45 +00:00
Sheldon Hearn
717a08b6e5 Replace our test(1) with NetBSD's pdksh-derived version. The code is
significantly easier to read and extend and offers a few new tests.
A few style changes taken from style(9) and OpenBSD, as well as
whitespace cleanups.

This change was discussed on freebsd-committers and freebsd-hackers
and met with approval from at least des, eivind and brian.

PR:	13091
Obtained from:	NetBSD
1999-08-16 09:44:09 +00:00
Chris Costello
cc056faf8e Bad reference of mount(1) changed to mount(8). 1999-08-14 06:26:14 +00:00
Chris Costello
bf6271821f Minor style fix - change 'if(!*v)' to 'if (!*v)' 1999-08-14 05:38:04 +00:00
Ruslan Ermilov
2028697c9a There is no special handling for SIGALRM as
sleep(3) is implemented using nanosleep(2).
1999-08-09 17:31:30 +00:00
Chris Costello
7007d55cc0 Document -f flag:
-f      Do not display a diagnostic message if chmod could not modify the
             mode for file.
1999-08-08 21:08:05 +00:00
Sheldon Hearn
f3a6a64e4a Add -n option to print numeric user and group IDs instead of names
in a long (-l) listing.

MFC-jockies should make sure that bde's concerns regarding the number
of digits required to represent a uid_t and the use of snprintf
on the associated PR have been addressed before going wild.

PR:	12866
Reported by:	Philip Kizer <pckizer@nostrum.com>
Obtained from:	NetBSD
1999-08-02 14:55:58 +00:00
Kris Kennaway
98ae496f7f Correct some style issues in my previous commit.
Submitted by:	bde
1999-07-22 14:26:21 +00:00
Sheldon Hearn
58aa6f74a2 Fix handling of the cd command inside evaluations. It was changing PWD,
which it should not do.

PR:	12578
Reported by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Submitted by:	Niall Smart <niall@pobox.com>
1999-07-19 11:00:33 +00:00
Brian Feldman
769e5815e3 Implement seekability for disk devices (not just regular files).
Also, fix pos_out() to do the same checks pos_in() did.

Done for:	jdp, luigi, the good of the world
1999-07-13 18:44:56 +00:00
Kris Kennaway
1f2dedd83d Add -W and fix the warning due to missing struct initializer 1999-07-10 05:46:44 +00:00
Bruce Evans
8c024a04db Improved error handling in rev.1.18: don't ignore failure of execve().
Fixed some style bugs in rev.1.18.
1999-07-04 15:42:04 +00:00
Kris Kennaway
f58bcbc97e Correct reference to the obsolete vadvise() to madvise() (with appropriate
arguments)

PR:		11586
Submitted by:	David Gilbert <dgilbert@velocet.ca>
Reviewed by:	Doug Rabson
1999-06-30 11:50:09 +00:00
Martin Cracauer
d430c0c167 Don't continue if parsing failed when -f is in use. Exit with nonzero value. 1999-06-25 09:04:48 +00:00
Kris Kennaway
794bf053c4 Undo some of the reversions from previous revisions, and attempt to
minimize diffs with {Net,Open}BSD

Hinted-More-Or-Less-By:	bde
1999-06-21 13:23:23 +00:00
Brian Feldman
54946e00b2 This is the second round of dd(1) changes. Some changes made/reversed by
request of Bruce. More changes may follow later. 'g' multiplier has
been added (i.e. dd seek=5g if=bigfile.) Some minor corrections were made
as well.

Noticed by: bde
1999-06-20 14:58:55 +00:00
Brian Feldman
767bc8ad79 Miscellaneous dd(1) changes: mainly fixing variable types (size_t, ssize_t,
off_t, int, u_int64_t, etc.). dd(1) should now work properly with REALLY
big amounts of data.
1999-06-19 19:49:35 +00:00
Kris Kennaway
305a253acf Changes from OpenBSD:
* Better usage() - correct syntax, display available commands
	  instead of examples
	* Accept command abbreviations
	* sprintf -> snprintf (for paranoia)
	* manpage capitalisation tweak

Obtained from:	OpenBSD
1999-06-07 13:53:57 +00:00
Kris Kennaway
f80db2b881 Use .Dq instead of ``'' in manpage
Use optimal blocksize for rm -P, instead of always using 8192-byte blocks
to overwrite the file.

Obtained from:	OpenBSD
1999-05-28 12:47:31 +00:00
Warner Losh
b790f1b6de getopt(3) returns -1 not EOF. 1999-05-23 23:24:26 +00:00
Jean-Marc Zucconi
e1e705c5b5 Chflags was clearing all flags supplied on the command line after a
clearing flag like dump or noschg, etc.

PR:		bin/10071
Submitted by:	Andreas Klussmann <andreas@infosys.heitec.net>
1999-05-21 17:04:13 +00:00
John-Mark Gurney
3bc1b1bb27 the month and three days are up for -hackers and the 24hrs for -committers.
add a -j flag that tells date not to try to set the date.  This allows you
to use date as a userland interface to strptime.

example:
TZ=GMT date -j -f "%a, %d %b %Y %T %Z" "Sun, 08 Nov 1998 02:22:20 GMT" +%s

which is the standard format for Last-modified headers in HTTP requests.

only one to respond: eivind
1999-05-14 00:28:41 +00:00
Kris Kennaway
790b555384 Grammatical fixes.
Obtained from:	OpenBSD
1999-05-12 13:48:47 +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
Poul-Henning Kamp
75c1354190 This Implements the mumbled about "Jail" feature.
This is a seriously beefed up chroot kind of thing.  The process
is jailed along the same lines as a chroot does it, but with
additional tough restrictions imposed on what the superuser can do.

For all I know, it is safe to hand over the root bit inside a
prison to the customer living in that prison, this is what
it was developed for in fact:  "real virtual servers".

Each prison has an ip number associated with it, which all IP
communications will be coerced to use and each prison has its own
hostname.

Needless to say, you need more RAM this way, but the advantage is
that each customer can run their own particular version of apache
and not stomp on the toes of their neighbors.

It generally does what one would expect, but setting up a jail
still takes a little knowledge.

A few notes:

   I have no scripts for setting up a jail, don't ask me for them.

   The IP number should be an alias on one of the interfaces.

   mount a /proc in each jail, it will make ps more useable.

   /proc/<pid>/status tells the hostname of the prison for
   jailed processes.

   Quotas are only sensible if you have a mountpoint per prison.

   There are no privisions for stopping resource-hogging.

   Some "#ifdef INET" and similar may be missing (send patches!)

If somebody wants to take it from here and develop it into
more of a "virtual machine" they should be most welcome!

Tools, comments, patches & documentation most welcome.

Have fun...

Sponsored by:   http://www.rndassociates.com/
Run for almost a year by:       http://www.servetheweb.com/
1999-04-28 11:38:52 +00:00
Tim Vanderhoek
a261bdc7a2 .Xr chflags 1 , 1999-04-27 23:33:52 +00:00
Warner Losh
426e9c1dcc First set of fixes to keep egcs happy. These include {} around single
statement if blocks[*] when the else could be ambiguous, not defaulting
to int type and removal of some unused variables.

[*] This is explicitly allowed by style(9) when the single statement
spans more than one line.

Reviewed by: obrien, chuckr
1999-04-25 21:13:34 +00:00
Bruce Evans
712d410833 Reverted some more of rev.1.9 (emphasize that -H != -h). 1999-04-25 11:58:25 +00:00
Dmitrij Tejblum
f15076c04a Quick fix to allow transfer files >2GB. 1999-04-25 10:36:00 +00:00
Nik Clayton
f3b7e70782 Revert part of the previous commit. Keep the example that shows how the
"-h" flag is used, but use "chown" in the example instead of "file".

Prompted by: bde
1999-04-24 10:08:09 +00:00
Martin Cracauer
57b2932a14 Next approach to make loops in interactive interruptable.
PR:		bin/9173
1999-04-21 11:52:39 +00:00
Masafumi Max NAKANE
120ac26db8 Typo fix. 1999-04-19 18:48:26 +00:00
Nik Clayton
a53f20cc1e Change description of file(1) following symlinks to the truth (namely,
by default, file(1) does not follow symlinks, the -L flag must be
specified.

PR:		docs/8602
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
Reviewed by:	nik
1999-04-14 18:45:07 +00:00
Martin Cracauer
466b673d7e Remove my temporary detection for PR 7059, Tor Egge fixed this bug.
PR:		7059
1999-04-13 12:43:55 +00:00
Tor Egge
c4e5a8a8b9 During variable expansion, the internal representation of the expression
might be relocated.  Handle this case.
PR:		7059
1999-04-13 04:13:09 +00:00
Martin Cracauer
4c1b08b3bb Fix typo in source-explaining comment. 1999-04-12 15:23:27 +00:00
Martin Cracauer
9d5efc1507 Add a guarded abort() for the problem in PR bin/7059 (no fix so far,
this is hairy).

Reformat this file to comply to style(9). It had mixed styles before.

PR:		bin/7059
1999-04-12 14:23:36 +00:00
Tor Egge
8b220a611d When a variable expansion is enclosed in double quotes, the internal
representation of the expression is quoted.  Take care of this when
doing pattern matching in conjunction with trimming.

	#!/bin/sh
	c=d:e; echo "${c%:e}"

PR:		NetBSD PR#7231
Noticed by:	Havard Eidnes <Havard.Eidnes@runit.sintef.no>
1999-04-09 15:23:48 +00:00
Peter Wemm
3d28e3ed4e Update p_flags doc. 1999-04-06 03:18:57 +00:00
Peter Wemm
4a40c5e7ee Look at p_lock instead of P_NOSWAP etc as an indicator of unswappability.
(While here, put a #ifndef pgtok around the macro that gets a redefinition
 warning)
1999-04-06 03:17:57 +00:00
Martin Cracauer
4487495433 In interactive shells, break loops to the topmost level when a child
is killed by a signal.

(In non-interactive shells - that means a shellscript - the shell just
exits, this was already working)

PR:		bin/9173
1999-04-03 12:55:51 +00:00
Martin Cracauer
b8ec435e6b Implement -a flag. A test shell script can be found at
http://www.cons.org/cracauer/download/sh-interrupt/testsuite/test_export.sh
The PR also had test cases the new version passes.

Fix typo in comment.

PR:		bin/1030
1999-04-03 11:41:46 +00:00
Martin Cracauer
2870f7a83c -T was missing in the synopsis line.
Submitted by:	BDE
1999-04-02 09:28:00 +00:00
Bill Paul
bb22740673 On FreeBSD/alpha, ps(1) does not correctly report process start times
and CPU runtime because it can't access the user area via /proc/<pid>/mem.
This is because the uarea is not mapped into the process address space
at USRSTACK on the alpha like it is on the x86.

Since I'm haven't been able to wrap my brain around the VM system enough
to be able to figure out how to achieve this mapping, and since it's
questionable that such an architectural change is correct, I implemented
a workaround to allow ps(1) to read the uarea from /dev/kmem using
kvm_read() instead of from the process address space via kvm_uread().
The kludge is hidden inside #ifdef __alpha__/#endif so as not to impact
the x86. (Note that top(1) probably uses this same gimmick since it works
on FreeBSD/alpha.)

Reviewed by: dfr
1999-04-01 14:45:18 +00:00
Martin Cracauer
c1c72a3c2a The immediate execution of traps I introduced in September 1998 (to
make /etc/rc interruptible in cases when programs hang with blocked
signals) isn't standard enough.

It is now switched off by default and a new switch -T enables it.

You should update /etc/rc to the version I'm about to commit in a few
minutes to keep it interruptible.
1999-04-01 13:27:36 +00:00
Brian Somers
71405fb6b3 sh doesn't support <> redirections.
PR:	7325
1999-03-31 21:02:01 +00:00
Brian Somers
269dfbee64 Support seconds with -v.
PR:		6308
Submitted by:	Max Euston <meuston@jmrodgers.com>
1999-03-09 09:38:54 +00:00
Jordan K. Hubbard
0e8f2d6c1a Don't emit usage() message when no arguments given to -f. This
appears to be consistent with other Unixen, like Solaris.

PR:		10240
Submitted by:	jun_sun@hlla.is.tsukuba.ac.jp
1999-02-25 22:18:08 +00:00
Bill Fenner
13ca3c01ec Clean up some .Os macro uses: quotes are not needed, multiple arguments
don't really work if the first one isn't "FreeBSD", and "FreeBSD-Experimental"
isn't an OS name.
1999-02-15 08:34:14 +00:00
Alexander Langer
43d1df332e Removed occurrences of consecutive repeated words (such as "the the"). 1999-02-12 02:12:08 +00:00
Garrett Wollman
bd98a81593 Fix synopsis to match 1003.2. Add text describing the way in which
our implementation does not meet 1003.2 (rather than the now outdated
``is expected to comply' language).
1999-01-28 17:41:02 +00:00
Julian Elischer
88c5ea4574 Enable Linux threads support by default.
This takes the conditionals out of the code that has been tested by
various people for a while.
ps and friends (libkvm) will need a recompile as some proc structure
changes are made.

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-26 02:38:12 +00:00
Daniel O'Callaghan
fd5a0a9b4b Example "19%y" changed to "%Y" to discourage poor usage. 1999-01-13 07:01:07 +00:00
Julian Elischer
d8c85307b2 Re-enable the options in ps(1) that were disabled with the Linux
threads support.

Submitted by:	"Richard Seaman, Jr." <dick@tar.com>
1999-01-13 03:11:43 +00:00
Julian Elischer
6626c6045c Reviewed by: Luoqi Chen, Jordan Hubbard
Submitted by:	 "Richard Seaman, Jr." <lists@tar.com>
Obtained from:	linux :-)

Code to allow Linux Threads to run under FreeBSD.

By default not enabled
This code is dependent on the conditional
COMPAT_LINUX_THREADS (suggested by Garret)
This is not yet a 'real' option but will be within some number of hours.
1998-12-19 02:55:34 +00:00
Joseph Koshy
c83e7c5041 Add references to test(1) and expr(1). 1998-12-18 03:51:18 +00:00
Joseph Koshy
e5bf7bf46c Add cross-references to test(1) and expr(1) respectively.
PR: 		docs/9111
Submitted by:	Josh Gilliam <josh@quick.net>
1998-12-18 03:16:47 +00:00
Peter Wemm
dd4cdf587c Cleaning out old stuff from one of my source trees:
use mkdtemp() rather than mktemp() and fix a trivial memory leak.
1998-12-16 05:29:09 +00:00
Warner Losh
a207266e91 Free memory from setmode.
Obtained from: OpenBSD
1998-12-16 04:45:35 +00:00
Warner Losh
0fd975510f Use getcwd in stead of using getwd so that we try harder to avoid
overflowing a buffer.

Obtained from: Either OpenBSD or a discussion in bugtraq.
1998-12-16 04:44:32 +00:00
Warner Losh
a4324714a9 Free memory obtained from setmode.
Obtained from: OpenBSD
1998-12-16 04:42:33 +00:00
Bruce Evans
d3f062f04e Don't put compiler warning flags in leaf Makefiles. 1998-12-07 12:50:48 +00:00
Bruce Evans
ed334a37cd CFLAGS+= -Wall -Wformat for all of src/bin. All warnings except 2 minor
ones in rmail have been fixed.
1998-12-07 12:44:12 +00:00
Bruce Evans
f58a6c7a68 Fixed printf format errors. 1998-12-07 12:37:11 +00:00
Bruce Evans
3b53d3803e Fixed warnx format errors in printf and csh, and snprintf format errors
in sh, by using separate macros for the 1, 2 and 3-arg calls to warnx.
(The 3-arg warnx macro in sh/bltin/bltin.h used to require bogus dummy
args.)
1998-12-07 12:14:04 +00:00
Bruce Evans
b98f433d36 Fixed -Wall regression (broken in rev.1.12). Removed unused includes. 1998-12-07 10:25:48 +00:00
Bruce Evans
9776f3dbad Fixed printf format errors (new bugs in rev.1.7). Fixed a spelling error
(rev.1.7 blew away most of rev.1.2-1.6; I'm only fixing blowing away of
rev.1.4).
1998-12-07 10:16:58 +00:00
Archie Cobbs
fa146c5335 Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
David E. O'Brien
f46ecf8bc9 Rev 1.13 fixes PR bin/8958 1998-12-06 05:49:29 +00:00
David E. O'Brien
f08c1d5e48 There is a bug in /bin/pax -s option processing. The code assumes that all
pattern matches will occur at offset zero of the source string.  The bug causes
the input source string pointer to be incremented by the offset of the end of
the match, instead of it's length.  The fix is to only increment the pointer by
the length of the pattern match (eo-so).

Of course, the one example in the man page shows a situation where the match
occurs at offset 0.

Submitted by:	John W. DeBoskey <jwd@unx.sas.com>
Obtained from:	freebsd-current@freebsd.org
1998-12-05 10:29:10 +00:00
Bill Fumerola
0bd063bcd3 Fix typo. "If the an entry" --> "If an entry"
PR:		docs/8140
Submitted by:	Sue Blake <sue@vedanix.welearn.com.au>
1998-12-02 23:20:11 +00:00
Bill Fumerola
969385c1d5 superceded -> superseded, which after some debate on #FreeBSD is in
fact the proper spelling.

PR:		docs/8697
Submitted by:	Sascha Blank <blank@fox.uni-trier.de>
1998-11-30 23:05:38 +00:00
Bill Fumerola
d234f408fe changable -> changeable
PR:		docs/8697
Submitted by:	Sascha Blank <blank@fox.uni-trier.de>
1998-11-30 22:56:44 +00:00
Bruce Evans
7d159f8837 Describe `bs=n' more precisely. Fixed some English errors.
Obtained from:		OpenBSD
1998-11-29 13:54:20 +00:00
Doug Rabson
eb235b13c7 Fix formatting of %CPU value on alpha.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-11-25 09:34:00 +00:00
Jordan K. Hubbard
f21a1a1015 Indicate that the thing not found was not /bin/pwd but rather $CWD (or .). 1998-11-21 08:45:22 +00:00
Bruce Evans
40fc4ee2de Don't use mmap() for non-regular files, since st_size is only meaningful
for regular files.  This fixes recent breakage of cp'ing from /dev/zero.
/dev/zero doesn't support mmap(), but the device driver mmap routines are
not called for mapping 0 bytes, so the error was not detected.  mmap()
can't even be used for cp'ing special files that support mmap(), since
there is general way to determine the file size.
1998-11-18 11:47:45 +00:00
Wolfram Schneider
146726f36f Use mmap for file coping. 5-10% faster than the read system call. 1998-11-14 23:43:11 +00:00
Mike Smith
e45520f76e Fix behaviour for 'mkdir -m 777 / /tmp/foo'. Play "guess the style bug"
with Bruce again.

Reported by:	bde
1998-10-23 06:28:40 +00:00
Mike Smith
16c0b5195c Honour the spirit rather than the implementation of the previous changes;
if we are invoked with -m, use chmod() on the final directory component
in order to ensure the mode is correctly set.
1998-10-22 21:42:20 +00:00
Mike Smith
37a182e2b2 Make this compile, and honour the spirit of the original design while
incorporating the intended fix.  Attempt to address some of the
putative style bugs introduced.  Others doubtless remain.

Embarrassed by: bde
1998-10-20 08:04:15 +00:00
Mike Smith
2426ecdfa2 - mkdir -m should call chmod because the high-order bits get ignored
by the kernel as a security feature of some sort.

Submitted by:	Wilfredo Sanchez <wsanchez@apple.com>
1998-10-20 06:37:01 +00:00
Mike Smith
4757e52686 - Fix off-by-one problem in tar where filenames of length 100
and dirnames of length 99 don't archive.

Submitted by:	Wilfredo Sanchez <wsanchez@apple.com>
Obtained from:  OpenBSD
1998-10-20 05:52:33 +00:00
Dag-Erling Smørgrav
1fd98d7d88 Calls one or more of malloc(), warn(), err(), syslog(), execlp() or
execvp() in the child branch of a vfork(). Changed to use fork()
instead.

Some of these (mv, find, apply, xargs) might benefit greatly from
being rewritten to use vfork() properly.

PR:		Loosely related to bin/8252
Approved by:	jkh and bde
1998-10-13 14:52:33 +00:00
Dag-Erling Smørgrav
0ffc35a465 Doh. What was I smoking when I wrote this?
PR:		bin/8301
Submitted by:	Tetsuya Furukawa <tetsuya@secom-sis.co.jp>
1998-10-13 12:19:31 +00:00
Joseph Koshy
22f6653381 Correct a grammatical nit and remove ambiguity about the effect of
the -p option.

PR:		8229
Submitted-by:	Sheldon Hearn <axl@iafrica.com>
1998-10-13 08:52:29 +00:00
Mark Murray
bacda65d14 Add JKH's auth.conf-file parser to turn Kerberos on/off in userland. 1998-10-09 06:31:45 +00:00
Jordan K. Hubbard
9a54dc6faf Null commit, just to test something. Please ignore. 1998-10-04 00:41:08 +00:00
Alexander Langer
f97fe12243 Added missing #include <string.h> 1998-10-03 16:29:59 +00:00
Kenneth D. Merry
c8c7ba2b9a Fix 'chio params' so that it actually prints out the current picker.
(This was broken when the volume tag changes went in.)

Submitted by:	Josef Karthauser <joe@pavilion.net>
1998-10-01 23:30:14 +00:00
Justin T. Gibbs
20bf9a142c Updated the ch(4) driver and chio(1) command to include volume
tag support.  These changes have been tested with a Breeze Hill
Q47 DLT and a DEC DLT2500 media changer.  The latter has no
volume tag support.

The chio(1) command was updated to include various flags to the
status subcommand.  These flags can be used to select additional
information to be displayed (like volume tags).

A new chio(1) subcommand named 'voltag' has been added which allows
for changes to volume tags inside the media changer controller.
This could not be tested as the Q47 does not provide the functio-
nality.

Submitted by:	Hans Huebner
1998-09-15 07:48:51 +00:00
Doug Rabson
3929d51888 Portability fixes when sizeof(int) != sizeof(long). 1998-09-14 08:32:20 +00:00
Warner Losh
d1762d1fbe Fix minor style bugs noticed by the Bruce Filter.[tm]
Bruce-Filter-By: bde
1998-09-13 19:54:54 +00:00
Tor Egge
5557a02a60 Be more consistent with handling of quote mark control character.
Don't output double-quotes inside variable expansion/arithmetic
expansion region in here-documents.  When leaving the arithmetic
expansion syntax mode, adjust the dblquote flag according to
previous syntax, in order to avoid splitting of quoted variables.
1998-09-13 19:24:57 +00:00
Warner Losh
a5da09996c Silence -Wall -W -Wkitchen-sink. Use ssize_t in preference to int,
make a char * const that should have been.  Use new style function
declaration for main.  Mostly a Bruce Filter[tm] test commit.
1998-09-11 05:48:06 +00:00
Martin Cracauer
9bbfa41541 Narrow down conditions to break wait() to process traps.
Improve comments.
1998-09-10 22:09:11 +00:00
Bruce Evans
e36039e731 Fixed breakage of %CPU and %MEM in the previous commit. sysctlbyname()
was called with wrong args so it always failed.

PR:		7881
1998-09-10 18:06:28 +00:00
Martin Cracauer
e6ac45dde2 Fix an inefficiency I introduced in my last commit.
Include "expand.h" vom memalloc.c to pull function declartion into scope
1998-09-10 14:51:06 +00:00
Martin Cracauer
135421ddbf If traps are set, they are now executed even when a signal-blocking
foreground child is running. Formerly, traps were exceuted after the
next child exit.

The enables the user to put a breaking wrapper around a blocking
application:
  (trap 'echo trap ; exit 1' 2; ./pestyblocker; echo -n)

The "echo -n" after the child call is needed to prevent sh from
optimizing the trap-executing shell away. I'm working on this.
1998-09-08 13:16:52 +00:00
Martin Cracauer
23f8fb3d1e Add -S flag to test for sockets.
PR:		bin/7507
Reviewed by:	I tested the patch
Submitted by:	Stefan `Sec` Zehl sec@42.org
1998-09-07 16:59:05 +00:00
Tor Egge
6f47734fd7 Better handling of word splitting. Don't record the same region
multiple times when performing nested variable expansion, and
preserve some quoting information in order to avoid removing
apparently empty expansion result.
1998-09-06 21:13:09 +00:00
Tor Egge
37f0a6708e Don't blindly eliminate `..' and the previous pathname component.
PR:		2541
Obtained from:	NetBSD
1998-09-06 21:01:57 +00:00
Gary Palmer
05da683dd4 Split lines into one subdir per line. 1998-08-30 20:22:15 +00:00
Martin Cracauer
1f40b47b46 Improve bookkeeping of in_waitcmd and style fixes.
Submitted by:	Bruce Evans
1998-08-25 09:33:34 +00:00
Martin Cracauer
40d009a717 Re-enable killing childs with SIGQUIT. Spotted by Bruce Evans. 1998-08-25 08:49:47 +00:00
Martin Cracauer
a1c7435ae3 Got two volatile sig_atomic_t and int mixed up. Spotted by Gary Palmer. 1998-08-24 19:15:48 +00:00
Martin Cracauer
7a8e920bb9 Do not exit on SIGINT in non-interactive shells, fixes PR 1206,
i.e. this makes emacs usable from system(3). Programs called from
shellscripts are now required to exit with proper signal status. That
means, they have to kill themself. Exiting with faked numerical exit
code is not sufficient.

Exit with proper signal status if script exits on signal.

Make the wait builtin interruptable, both with and without traps set.

Use volatile sig_atomic_t where (and only where) appropriate.

(Almost) fix printing of newlines on SIGINT.

Make traps setable from trap handlers. This is needed for shellscripts
that catch SIGINT for cleanup work but intend to exit on it, hance
have to kill themself from a trap handler. I.e. mkdep.

While I'm at it, make it -Wall clean. -Wall is not enabled in
Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c
are not -Wall-able.
PR:		1206
Obtained from:	Basic SIGINT fix from Bruce Evans
1998-08-24 10:20:37 +00:00
John Birrell
00bc12659e Now that alpha uses FreeBSD syscalls, all these work. 1998-08-15 12:27:23 +00:00
Doug Rabson
d1ade4ad42 Silence some warnings when building on the alpha. 1998-08-07 09:39:11 +00:00
Mark Murray
448bbb5805 Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
Peter Wemm
9723ac470b Use sendmail-8.9.1 rmail (with our changes). 1998-08-04 15:19:16 +00:00
Tim Vanderhoek
bb2b4fafae Add missing "else", without whom the prev. commit is a null change.
Fix a 2nd level indentation style bug.
1998-08-02 22:47:11 +00:00