Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/rm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 27  int rm_main(int argc UNUSED_PARAM, char Line 27  int rm_main(int argc UNUSED_PARAM, char
27   unsigned opt;   unsigned opt;
28    
29   opt_complementary = "f-i:i-f";   opt_complementary = "f-i:i-f";
30   opt = getopt32(argv, "fiRr");   /* -v (verbose) is ignored */
31     opt = getopt32(argv, "fiRrv");
32   argv += optind;   argv += optind;
33   if (opt & 1)   if (opt & 1)
34   flags |= FILEUTILS_FORCE;   flags |= FILEUTILS_FORCE;
35   if (opt & 2)   if (opt & 2)
36   flags |= FILEUTILS_INTERACTIVE;   flags |= FILEUTILS_INTERACTIVE;
37   if (opt & 12)   if (opt & (8|4))
38   flags |= FILEUTILS_RECUR;   flags |= FILEUTILS_RECUR;
39    
40   if (*argv != NULL) {   if (*argv != NULL) {
# Line 41  int rm_main(int argc UNUSED_PARAM, char Line 42  int rm_main(int argc UNUSED_PARAM, char
42   const char *base = bb_get_last_path_component_strip(*argv);   const char *base = bb_get_last_path_component_strip(*argv);
43    
44   if (DOT_OR_DOTDOT(base)) {   if (DOT_OR_DOTDOT(base)) {
45   bb_error_msg("cannot remove '.' or '..'");   bb_error_msg("can't remove '.' or '..'");
46   } else if (remove_file(*argv, flags) >= 0) {   } else if (remove_file(*argv, flags) >= 0) {
47   continue;   continue;
48   }   }

Legend:
Removed from v.983  
changed lines
  Added in v.984