Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/coreutils/rm.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/coreutils/rm.c
r1765 r2725 5 5 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu> 6 6 * 7 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 8 */ 9 9 … … 20 20 /* This is a NOFORK applet. Be very careful! */ 21 21 22 int rm_main(int argc, char **argv) ;23 int rm_main(int argc , char **argv)22 int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 23 int rm_main(int argc UNUSED_PARAM, char **argv) 24 24 { 25 25 int status = 0; … … 28 28 29 29 opt_complementary = "f-i:i-f"; 30 opt = getopt32(argv, "fiRr"); 30 /* -v (verbose) is ignored */ 31 opt = getopt32(argv, "fiRrv"); 31 32 argv += optind; 32 33 if (opt & 1) … … 34 35 if (opt & 2) 35 36 flags |= FILEUTILS_INTERACTIVE; 36 if (opt & 12)37 if (opt & (8|4)) 37 38 flags |= FILEUTILS_RECUR; 38 39 39 40 if (*argv != NULL) { 40 41 do { 41 const char *base = bb_get_last_path_component (*argv);42 const char *base = bb_get_last_path_component_strip(*argv); 42 43 43 44 if (DOT_OR_DOTDOT(base)) { 44 bb_error_msg("can not remove '.' or '..'");45 bb_error_msg("can't remove '.' or '..'"); 45 46 } else if (remove_file(*argv, flags) >= 0) { 46 47 continue;
Note:
See TracChangeset
for help on using the changeset viewer.