Any objections to the following?
Jordan Hubbard
jkh at brierdr.com
Fri Nov 12 10:58:49 PST 2004
RCS file: /home/ncvs/src/bin/rm/rm.c,v
retrieving revision 1.51
diff -u -r1.51 rm.c
--- rm.c 28 Oct 2004 08:25:30 -0000 1.51
+++ rm.c 12 Nov 2004 19:02:59 -0000
@@ -192,8 +192,11 @@
flags |= FTS_NOSTAT;
if (Wflag)
flags |= FTS_WHITEOUT;
- if (!(fts = fts_open(argv, flags, NULL)))
+ if (!(fts = fts_open(argv, flags, NULL))) {
+ if (fflag) /* Don't emit diagnostic if force set */
+ return;
err(1, "fts_open");
+ }
while ((p = fts_read(fts)) != NULL) {
switch (p->fts_info) {
case FTS_DNR:
This allows:
rm -rf ""
To behave the same as:
rm -f ""
Which is to say that no diagnostic will be emitted if you're forcing
the operation (and ignoring errors).
- Jordan
More information about the freebsd-standards
mailing list