Date: Fri, 12 Nov 2004 12:45:28 -0800 From: Jordan Hubbard <jkh@brierdr.com> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: standards@freebsd.org Subject: Re: Any objections to the following? Message-ID: <C969A942-34EB-11D9-893C-000393DACFAC@brierdr.com> In-Reply-To: <200411121909.iACJ9o5t093134@khavrinen.lcs.mit.edu> References: <E6821B92-34DC-11D9-893C-000393DACFAC@brierdr.com> <200411121909.iACJ9o5t093134@khavrinen.lcs.mit.edu>
index | next in thread | previous in thread | raw e-mail
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@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-standards
> To unsubscribe, send any mail to
> "freebsd-standards-unsubscribe@freebsd.org"
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C969A942-34EB-11D9-893C-000393DACFAC>
