cvs commit: src/bin/rm rm.1 rm.c
M. Warner Losh
imp at bsdimp.com
Mon Oct 4 09:37:02 PDT 2004
In message: <200410041126.i94BQ273055417 at repoman.freebsd.org>
Dag-Erling Smorgrav <des at FreeBSD.org> writes:
: des 2004-10-04 11:26:02 UTC
: 1.30 +2 -1 src/bin/rm/rm.1
: 1.49 +23 -0 src/bin/rm/rm.c
I contend that this change is technically flawed. While it is allowed
by the standards, I believe we should exit entirely when we hit this
'third rail' rather than just ignoring the offending arg. If it is
there as a sanity check, and you hit it, you can't assume that the
rest of the arguments are sane at all. This is fundamentally
different than the '.' checks, which do remove the bad args from the
list and aren't likely the results of an error.
All the other points I was going to make, actually are handled well:
exit values are correct
looks for them all before doing anything
style(9) is ok
escape hatch (rm -rf // will do it)
etc
So from a technical point of view, my opinion is that the only error
in this commit is a warn(...) where there should be an errx(1, ...).
Warner
More information about the cvs-src
mailing list