projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ftpd: do not use nasty tricks for re-execing if we are on MMU machine.
[oweals/busybox.git]
/
coreutils
/
rm.c
diff --git
a/coreutils/rm.c
b/coreutils/rm.c
index cc2264770398e2e20b281442fab059e9ff44f4c5..975f2267b1f219cfd427601b2707e0654c0b009f 100644
(file)
--- a/
coreutils/rm.c
+++ b/
coreutils/rm.c
@@
-19,15
+19,15
@@
/* This is a NOFORK applet. Be very careful! */
/* This is a NOFORK applet. Be very careful! */
-int rm_main(int argc, char **argv);
-int rm_main(int argc, char **argv)
+int rm_main(int argc, char **argv)
MAIN_EXTERNALLY_VISIBLE
;
+int rm_main(int argc
UNUSED_PARAM
, char **argv)
{
int status = 0;
int flags = 0;
unsigned opt;
opt_complementary = "f-i:i-f";
{
int status = 0;
int flags = 0;
unsigned opt;
opt_complementary = "f-i:i-f";
- opt = getopt32(arg
c, arg
v, "fiRr");
+ opt = getopt32(argv, "fiRr");
argv += optind;
if (opt & 1)
flags |= FILEUTILS_FORCE;
argv += optind;
if (opt & 1)
flags |= FILEUTILS_FORCE;
@@
-38,7
+38,7
@@
int rm_main(int argc, char **argv)
if (*argv != NULL) {
do {
if (*argv != NULL) {
do {
- const char *base = bb_get_last_path_component(*argv);
+ const char *base = bb_get_last_path_component
_strip
(*argv);
if (DOT_OR_DOTDOT(base)) {
bb_error_msg("cannot remove '.' or '..'");
if (DOT_OR_DOTDOT(base)) {
bb_error_msg("cannot remove '.' or '..'");