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/realpath.c

    r1765 r2725  
    88 * if one or more paths cannot be resolved.
    99 *
    10  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     10 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    1111 */
    1212
    1313#include "libbb.h"
    1414
    15 int realpath_main(int argc, char **argv);
    16 int realpath_main(int argc, char **argv)
     15int realpath_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     16int realpath_main(int argc UNUSED_PARAM, char **argv)
    1717{
    1818    int retval = EXIT_SUCCESS;
    1919
    20 #if PATH_MAX > (BUFSIZ+1)
    21     RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX);
    22 # define resolved_path_MUST_FREE 1
    23 #else
    24 #define resolved_path bb_common_bufsiz1
    25 # define resolved_path_MUST_FREE 0
    26 #endif
    27 
    28     if (--argc == 0) {
     20    if (!*++argv) {
    2921        bb_show_usage();
    3022    }
    3123
    3224    do {
    33         argv++;
    34         if (realpath(*argv, resolved_path) != NULL) {
     25        char *resolved_path = xmalloc_realpath(*argv);
     26        if (resolved_path != NULL) {
    3527            puts(resolved_path);
     28            free(resolved_path);
    3629        } else {
    3730            retval = EXIT_FAILURE;
    38             bb_perror_msg("%s", *argv);
     31            bb_simple_perror_msg(*argv);
    3932        }
    40     } while (--argc);
    41 
    42 #if ENABLE_FEATURE_CLEAN_UP && resolved_path_MUST_FREE
    43     RELEASE_CONFIG_BUFFER(resolved_path);
    44 #endif
     33    } while (*++argv);
    4534
    4635    fflush_stdout_and_exit(retval);
Note: See TracChangeset for help on using the changeset viewer.