Commit Graph

44 Commits

Author SHA1 Message Date
ru
128310ec7a mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00
obrien
5e2b5a5185 Display pathname of item being rm'ed.
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-12-20 08:31:26 +00:00
ru
951f048dbb Prepare for mdoc(7)NG. 2000-12-15 17:37:31 +00:00
ru
c835e11eed mdoc(7) police: use the new features of the Nm macro. 2000-11-20 11:39:41 +00:00
joe
d38d9a6248 Switch over to using the new fflagstostr and strtofflags library calls. 2000-06-17 14:19:33 +00:00
asmodai
888d579612 Remove unused #include. 2000-05-01 18:34:36 +00:00
joe
bb1bbb6d1f 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
joe
a3a381812b 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
bde
00c594d838 Actually remove unrequired SRCS. 2000-01-05 19:22:10 +00:00
joe
f6504eea50 Added missing DPADD's. Removed unrequired SRCS's.
Obtained from:	bde
2000-01-01 15:44:11 +00:00
joe
e1558fa7cb 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
sheldonh
e4586fe222 Fix cut'n'paste niggles in previous commit. 1999-12-21 08:57:58 +00:00
sheldonh
a16eee301a 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
mharo
7e22d49a6b brucify
Reviewed by:	obrien
1999-11-28 09:34:21 +00:00
bde
45610c66ad 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
mharo
281ecd6252 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
c6d21f8ff9 fix rm -r
Submitted by:	John Hay -- John.Hay@mikom.csir.co.za
1999-08-29 19:57:03 +00:00
mharo
7f61632b5b add verbose flag
exit(1) --> exit(EX_USAGE)

Reviewed by:	obrien
1999-08-29 02:20:26 +00:00
peter
3b7c52fb9a $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
kris
b2caa33057 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
jkh
783145b62d 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
wollman
afaee2af32 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
charnier
c3deda5a63 .Nm rm -> .Nm. 1998-05-18 06:37:35 +00:00
steve
c3b9042311 Remove remaining Lite1 stuff from the man page and uphold the
precedence in changing sccsid to rcsid as set by Phillippe
Charnier in his previous 100 or so commits.

pointed out by: Bruce Evans <bde@zeta.org.au>
1997-08-07 21:37:39 +00:00
steve
1a8069828d Remove #if(n)def BSD_4_4_LITE cruft and change sccsid to rcsid. 1997-08-07 15:37:47 +00:00
dfr
c70c291f10 Enable whiteout code since we now have the lite2 support for them. 1997-04-29 10:03:10 +00:00
mpp
969cc91da0 Provide examples of how to remove file names that begin with
a dash in non-getopt implementations.  E.g.:
	rm /home/mpp/-filename
	rm ./-filename

Requested by: bde
1997-04-09 05:04:43 +00:00
mpp
9baabea624 Improve the wording in the NOTES section. Closes PR# 3223. 1997-04-08 20:27:48 +00:00
imp
cdc0e920d8 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
peter
34fd560164 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
steve
f36f15733f Merge Lite2 mods, and -Wall cleaning. Unimplemented undelete(2)
cruft is protected by a #ifdef (BSD4_4_LITE) that should be
removed when this is supported by the kernel.
1996-12-14 06:11:53 +00:00
wosch
d4a1c1cff8 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
wosch
fbfd06b398 fix usage string
respond `Y' is equal to `y'

Add a note how to delete file name with beginning `-'
1996-03-07 23:26:59 +00:00
pst
149ff31550 Don't initialize udata, fix usage string 1996-02-19 05:57:22 +00:00
wosch
2a9518f55e delete my last commit
Submitted by:	pst, ache
1996-02-19 00:44:19 +00:00
pst
0b55bfa8d9 Remove unnecessary '?' case and don't zero global udata, it's already zero 1996-02-18 19:54:04 +00:00
wosch
969d6e965c update usage string
all flag variables initialized with zero
respond `Y' is equal to `y'
1996-02-18 19:00:59 +00:00
ache
f1c135d401 Allow root to delete uchg/uappnd files 1995-04-13 13:35:09 +00:00
dg
00eb2a4dc0 Added $Id$ 1994-09-24 02:59:15 +00:00
bde
3c24b05a38 Remove redundant declarations that were added in the previous commit. 1994-09-21 22:31:01 +00:00
phk
b9caa52a52 Applied patch to make -Wall and -Dlint shut up.
Reviewed by:	phk
Submitted by:	Josef Grosch <joeg@gagme.wwa.com>
1994-09-20 07:18:04 +00:00
ats
43c81e6ecd Reviewed by:
Submitted by:
Added the FTS_NOCHDIR flag to the fts-open call. This is needed, so that
the fts don't change the current directory for rm and subsequent calls
to rmdir with relative pathnames don't fail.
Pulled over the bugfix in 1.1.5.
1994-08-28 18:34:50 +00:00
rgrimes
e3cfc8ce61 BSD 4.4 Lite bin Sources 1994-05-26 06:18:55 +00:00