Commit Graph

747 Commits

Author SHA1 Message Date
ru
8e2cd16fb8 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
markm
323c69d480 Fix for new Kerberos4. 1999-09-19 22:11:15 +00:00
green
a12ece1af8 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
green
4e25c183b5 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
sheldonh
d003c4a860 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
green
996b2b913e 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
phantom
167f52768b Fix SEE ALSO section:
. add printenv(1)
. correct reference to "CSH introduction"

Reviewed by:	mpp
1999-09-13 19:16:47 +00:00
bde
019fd9cb5f 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
green
e40ba94136 ISDISK -> ISSEEK
Allow a device type of D_DISK or D_MEM to be ISSEEK.
1999-09-12 18:56:12 +00:00
green
4c16a85a3f 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
obrien
cb13e979b2 Add verbose processing flag. 1999-09-11 10:06:56 +00:00
green
a9f7b5ee69 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
sheldonh
4000b20086 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
mharo
199f72f333 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
mharo
5012b180b8 mention that -v is non-standard
Reviewed-by:	obrien
1999-09-04 03:33:18 +00:00
mharo
0cae029984 brucify and add comment about -v being non-standard to manpage
Reviewed by:	obrien
1999-09-04 03:19:38 +00:00
sheldonh
506aa9c1b6 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
sheldonh
b337d66e78 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
bde
7e1d2c3043 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
mharo
0e47c5f37a fix rm -r
Submitted by:	John Hay -- John.Hay@mikom.csir.co.za
1999-08-29 19:57:03 +00:00
mharo
92582195da add verbose flag 1999-08-29 08:21:16 +00:00
mharo
5e14615656 brucify and move printf() to catch cases of special files 1999-08-29 07:58:19 +00:00
mharo
2e0328a8ba add verbose flag
exit(1) --> exit(EX_USAGE)

Reviewed by:	obrien
1999-08-29 02:20:26 +00:00
mpp
e9a5cbf430 Fix typo in previous commit that documented the -v option. 1999-08-28 21:38:36 +00:00
mharo
98ee646b7c add verbose flag
Reviewed by:	obrien
1999-08-28 20:46:00 +00:00
green
c4aced0891 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
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
peter
66312e4a8d $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
green
1b913741fc Use FIODTYPE to unbogosify much of the file type checking in dd. 1999-08-27 16:36:46 +00:00
sheldonh
ff03d3b520 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
tg
da827dcea3 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
mharo
5f9fd788f5 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
jkh
03b6089d20 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
0fd3ba1d5d Sort cross-references. Move mount(8) down the list where it belongs, in
particular.
1999-08-25 08:45:31 +00:00
green
651feb3ee0 Make the comments nice, short-but-sweet XXX format.
Submitted by:	sheldonh
1999-08-24 06:10:14 +00:00
chris
f92dd3f904 Backed out my -n change to imply -l by request of sheldonh. 1999-08-23 05:39:40 +00:00
chris
4a1cbe0182 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
green
7b8ec14379 Make a comment I added a bit nicer. 1999-08-22 22:32:41 +00:00
green
124c84f339 Finally: fix test -x as completely as possible.
Reviewed by: bde
Reworked by: bde
1999-08-20 16:19:26 +00:00
sheldonh
7c5ab4e28d 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
sheldonh
c57b7dbc2a 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
green
74ed588ff9 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
ru
466108918b 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
sheldonh
90a5109c16 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
91b9b5506d Bad reference of mount(1) changed to mount(8). 1999-08-14 06:26:14 +00:00
chris
855aedd7e7 Minor style fix - change 'if(!*v)' to 'if (!*v)' 1999-08-14 05:38:04 +00:00
ru
a790057542 There is no special handling for SIGALRM as
sleep(3) is implemented using nanosleep(2).
1999-08-09 17:31:30 +00:00
chris
5bc66261ca 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
sheldonh
744826805a 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
9fd8ecafa7 Correct some style issues in my previous commit.
Submitted by:	bde
1999-07-22 14:26:21 +00:00