Any objections to the following?
Jordan Hubbard
jkh at brierdr.com
Fri Nov 12 12:45:38 PST 2004
OK, good point. So, then this:
+++ rm.c 12 Nov 2004 20:51:02 -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 && errno == ENOENT) /* 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:
If no objections, I'll commit in the next 12 hours or so.
- Jordan
On Nov 12, 2004, at 11:09 AM, Garrett Wollman wrote:
> <<On Fri, 12 Nov 2004 10:58:54 -0800, Jordan Hubbard <jkh at brierdr.com>
> said:
>
>> 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).
>
> According to the Standard, only [ENOENT] diagnostics should be
> suppressed.
>
> -GAWollman
>
> _______________________________________________
> freebsd-standards at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-standards
> To unsubscribe, send any mail to
> "freebsd-standards-unsubscribe at freebsd.org"
More information about the freebsd-standards
mailing list