Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/coreutils/rm.c


Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/coreutils/rm.c

    r1765 r2725  
    55 * Copyright (C) 2001 Matt Kraai <kraai@alumni.carnegiemellon.edu>
    66 *
    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.
    88 */
    99
     
    2020/* This is a NOFORK applet. Be very careful! */
    2121
    22 int rm_main(int argc, char **argv);
    23 int rm_main(int argc, char **argv)
     22int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     23int rm_main(int argc UNUSED_PARAM, char **argv)
    2424{
    2525    int status = 0;
     
    2828
    2929    opt_complementary = "f-i:i-f";
    30     opt = getopt32(argv, "fiRr");
     30    /* -v (verbose) is ignored */
     31    opt = getopt32(argv, "fiRrv");
    3132    argv += optind;
    3233    if (opt & 1)
     
    3435    if (opt & 2)
    3536        flags |= FILEUTILS_INTERACTIVE;
    36     if (opt & 12)
     37    if (opt & (8|4))
    3738        flags |= FILEUTILS_RECUR;
    3839
    3940    if (*argv != NULL) {
    4041        do {
    41             const char *base = bb_get_last_path_component(*argv);
     42            const char *base = bb_get_last_path_component_strip(*argv);
    4243
    4344            if (DOT_OR_DOTDOT(base)) {
    44                 bb_error_msg("cannot remove '.' or '..'");
     45                bb_error_msg("can't remove '.' or '..'");
    4546            } else if (remove_file(*argv, flags) >= 0) {
    4647                continue;
Note: See TracChangeset for help on using the changeset viewer.