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/libbb/remove_file.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
     
    1212/* Used from NOFORK applets. Must not allocate anything */
    1313
    14 int remove_file(const char *path, int flags)
     14int FAST_FUNC remove_file(const char *path, int flags)
    1515{
    1616    struct stat path_stat;
     
    1818    if (lstat(path, &path_stat) < 0) {
    1919        if (errno != ENOENT) {
    20             bb_perror_msg("cannot stat '%s'", path);
     20            bb_perror_msg("can't stat '%s'", path);
    2121            return -1;
    2222        }
    2323        if (!(flags & FILEUTILS_FORCE)) {
    24             bb_perror_msg("cannot remove '%s'", path);
     24            bb_perror_msg("can't remove '%s'", path);
    2525            return -1;
    2626        }
     
    6464
    6565        if (closedir(dp) < 0) {
    66             bb_perror_msg("cannot close '%s'", path);
     66            bb_perror_msg("can't close '%s'", path);
    6767            return -1;
    6868        }
     
    7575
    7676        if (rmdir(path) < 0) {
    77             bb_perror_msg("cannot remove '%s'", path);
     77            bb_perror_msg("can't remove '%s'", path);
    7878            return -1;
    7979        }
     
    8383
    8484    /* !ISDIR */
    85     if ((!(flags & FILEUTILS_FORCE) && access(path, W_OK) < 0
    86             && !S_ISLNK(path_stat.st_mode) && isatty(0))
     85    if ((!(flags & FILEUTILS_FORCE)
     86         && access(path, W_OK) < 0
     87         && !S_ISLNK(path_stat.st_mode)
     88         && isatty(0))
    8789     || (flags & FILEUTILS_INTERACTIVE)
    8890    ) {
     
    9395
    9496    if (unlink(path) < 0) {
    95         bb_perror_msg("cannot remove '%s'", path);
     97        bb_perror_msg("can't remove '%s'", path);
    9698        return -1;
    9799    }
Note: See TracChangeset for help on using the changeset viewer.