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

    r1765 r2725  
    66 * Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
    77 *
    8  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    99 */
    1010
    1111#include "libbb.h"
    12 extern char **environ;
    1312
    14 int printenv_main(int argc, char **argv);
    15 int printenv_main(int argc, char **argv)
     13/* This is a NOFORK applet. Be very careful! */
     14
     15int printenv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     16int printenv_main(int argc UNUSED_PARAM, char **argv)
    1617{
     18    int exit_code = EXIT_SUCCESS;
     19
    1720    /* no variables specified, show whole env */
    18     if (argc == 1) {
     21    if (!argv[1]) {
    1922        int e = 0;
    2023        while (environ[e])
     
    2831            if (env)
    2932                puts(env);
     33            else
     34                exit_code = EXIT_FAILURE;
    3035        }
    3136    }
    3237
    33     fflush_stdout_and_exit(0);
     38    fflush_stdout_and_exit(exit_code);
    3439}
Note: See TracChangeset for help on using the changeset viewer.