| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
OK'ed by: imp, core
|
|
|
|
|
|
|
|
|
| |
o When fts_read() cannot stat the file, it can't be unlinked. At
that case, don't display error message when -f flag is used.
Obtained from: bde
PR: kern/16815, bin/35842
Reported by: kuriyama, Aleksandr A. Babaylov <.@babolo.ru>
|
|
|
|
|
|
|
|
|
| |
do only unlink the file if we could indeed overwrite the file.
Old behaviour: rm -P /tmp/foo (foo mode 0444) would NOT overwrite foo,
but still delete it (with a warning: rm: foo: Permission denied)
New behaviour: Just the EPERM warning, but no deletion
Reviewed by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rm_overwrite() (for rm -P).
2. Print the file name in the error message for (fatal) malloc() failures
in rm_overwrite(). I first thought that malloc() failures should be
non-fatal since they don't prevent proceeding the the next file, but
making them non-fatal would normally give too much output for rm -Pr
on a large tree in the unlikely event that even one occurs, since the
malloc()ed amounts are usually the same. Just print the file name since
the malloc()ed amounts are not always the same and it doesn't hurt to
know where rm was when it quit.
Submitted by: guido ((1) and original version of (2))
|
| |
|
|
|
|
| |
Suggested by: Craig Carey <research@ijs.co.nz) on -doc.
|
| |
|
|
|
|
| |
src/contrib/gcc/c-format.c .
|
|
|
|
| |
before I made unlink use getopt().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
arg 2 to err() and friends, and warnings are promoted to errors.
This allows the following revisions to be reverted:
rev 1.39 src/bin/cp/cp.c
rev 1.26 src/bin/chmod/chmod.c
rev 1.40 src/bin/rm/rm.c
The following revisions can already be reverted, because they were
already covered by WFORMAT=0:
rev 1.8 src/bin/ls/lomac.c
rev 1.63 src/bin/ls/ls.c
rev 1.8 src/bin/ps/lomac.c
rev 1.34 src/bin/rcp/rcp.c
|
|
|
|
| |
happy about it any more so change the usage to make buildworld work again.
|
| |
|
| |
|
|
|
|
| |
Reviewed by: brian
|
|
|
|
| |
PR: 35471
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move group_from_gid to grp.h
Remove from stdlib.h
Make the prototypes match the code
Fix rm and mv to include new files.
NetBSD has these defined in those files, and others too that I've not
done.
Approved by: terminal room kabal
Reviewed by: jhb, phk
|
|
|
|
|
|
|
|
|
| |
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(which somehow now seems to be the default for compiling -current).
This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system,
it may well be that there are other apps which have similar problems,
but I did not spot them as they are not included in my picobsd config.
Whether adding prototypes for main() is the correct solution or not
I have no idea, a request to -current on the matter went basically
unanswered. Those who have better ideas are welcome to back this out
and replace it with the correct fix.
|
|
|
|
|
|
| |
set WARNS=0.
Reviewed by: mike
|
|
|
|
| |
Submitted by: Mike Barcroft <mike@q9media.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Submitted by: Peter Pentchev <roam@orbitel.bg>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
| |
|
|
|
|
| |
Obtained from: bde
|
|
|
|
| |
many places nowadays.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Reviewed by: obrien
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
make code slightly easier to read
Reviewed by: obrien
|
|
|
|
| |
Submitted by: John Hay -- John.Hay@mikom.csir.co.za
|
|
|
|
|
|
| |
exit(1) --> exit(EX_USAGE)
Reviewed by: obrien
|
| |
|
|
|
|
|
|
|
| |
Use optimal blocksize for rm -P, instead of always using 8192-byte blocks
to overwrite the file.
Obtained from: OpenBSD
|
|
|
|
|
|
|
| |
appears to be consistent with other Unixen, like Solaris.
PR: 10240
Submitted by: jun_sun@hlla.is.tsukuba.ac.jp
|
|
|
|
|
| |
our implementation does not meet 1003.2 (rather than the now outdated
``is expected to comply' language).
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
a dash in non-getopt implementations. E.g.:
rm /home/mpp/-filename
rm ./-filename
Requested by: bde
|