diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-04 00:28:06 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-04 00:28:06 +0400 |
commit | 40920825d59874cf285390434486e88c8498d2d8 (patch) | |
tree | 1bf7d7300ac410608a50b2c402966d492373ff24 | |
parent | b6332248ca4d781b4142fb9b6fe7e97a4a9ad59d (diff) |
rename bb_default_error_retval -> xfunc_error_retval
-rw-r--r-- | applets/applets.c | 2 | ||||
-rw-r--r-- | coreutils/cmp.c | 4 | ||||
-rw-r--r-- | coreutils/env.c | 4 | ||||
-rw-r--r-- | coreutils/nice.c | 2 | ||||
-rw-r--r-- | coreutils/nohup.c | 2 | ||||
-rw-r--r-- | coreutils/sort.c | 2 | ||||
-rw-r--r-- | coreutils/tty.c | 2 | ||||
-rw-r--r-- | editors/sed.c | 2 | ||||
-rw-r--r-- | include/libbb.h | 2 | ||||
-rw-r--r-- | libbb/default_error_retval.c | 2 | ||||
-rw-r--r-- | libbb/error_msg_and_die.c | 2 | ||||
-rw-r--r-- | libbb/fflush_stdout_and_exit.c | 2 | ||||
-rw-r--r-- | libbb/herror_msg_and_die.c | 2 | ||||
-rw-r--r-- | libbb/perror_msg_and_die.c | 2 | ||||
-rw-r--r-- | libbb/xfuncs.c | 2 | ||||
-rw-r--r-- | miscutils/crontab.c | 2 | ||||
-rw-r--r-- | networking/arping.c | 2 |
17 files changed, 19 insertions, 19 deletions
diff --git a/applets/applets.c b/applets/applets.c index e992998d6..d5b2672a0 100644 --- a/applets/applets.c +++ b/applets/applets.c @@ -443,7 +443,7 @@ void bb_show_usage(void) applet_using->name, usage_string); } - exit (bb_default_error_retval); + exit(xfunc_error_retval); } static int applet_name_compare(const void *name, const void *vapplet) diff --git a/coreutils/cmp.c b/coreutils/cmp.c index d26c3db8c..d0d976997 100644 --- a/coreutils/cmp.c +++ b/coreutils/cmp.c @@ -31,7 +31,7 @@ static FILE *cmp_xfopen_input(const char * const filename) return fp; } - exit(bb_default_error_retval); /* We already output an error message. */ + exit(xfunc_error_retval); /* We already output an error message. */ } static const char fmt_eof[] = "cmp: EOF on %s\n"; @@ -52,7 +52,7 @@ int cmp_main(int argc, char **argv) unsigned opt; int retval = 0; - bb_default_error_retval = 2; /* 1 is returned if files are different. */ + xfunc_error_retval = 2; /* 1 is returned if files are different. */ opt = bb_getopt_ulflags(argc, argv, opt_chars); diff --git a/coreutils/env.c b/coreutils/env.c index b42d90435..2af15a37e 100644 --- a/coreutils/env.c +++ b/coreutils/env.c @@ -26,7 +26,7 @@ * - correct "-" option usage * - multiple "-u unsetenv" support * - GNU long option support - * - use bb_default_error_retval + * - use xfunc_error_retval */ #include "busybox.h" @@ -82,7 +82,7 @@ int env_main(int argc, char** argv) if (*argv) { execvp(*argv, argv); /* SUSv3-mandated exit codes. */ - bb_default_error_retval = (errno == ENOENT) ? 127 : 126; + xfunc_error_retval = (errno == ENOENT) ? 127 : 126; bb_perror_msg_and_die("%s", *argv); } diff --git a/coreutils/nice.c b/coreutils/nice.c index ad0178b7f..4c54dddbb 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c @@ -67,6 +67,6 @@ int nice_main(int argc, char **argv) execvp(*argv, argv); /* Now exec the desired program. */ /* The exec failed... */ - bb_default_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */ + xfunc_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */ bb_perror_msg_and_die("%s", *argv); } diff --git a/coreutils/nohup.c b/coreutils/nohup.c index cf8ad2cd4..439fbb173 100644 --- a/coreutils/nohup.c +++ b/coreutils/nohup.c @@ -17,7 +17,7 @@ int nohup_main(int argc, char **argv) int temp, nullfd; char *nohupout, *home = NULL; - bb_default_error_retval = 127; + xfunc_error_retval = 127; if (argc<2) bb_show_usage(); diff --git a/coreutils/sort.c b/coreutils/sort.c index 7dfe1764c..c450cfbe6 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -225,7 +225,7 @@ int sort_main(int argc, char **argv) char *line,**lines=NULL,*optlist="ngMucszbrdfimS:T:o:k:t:"; int c; - bb_default_error_retval = 2; + xfunc_error_retval = 2; /* Parse command line options */ while((c=getopt(argc,argv,optlist))>0) { line=strchr(optlist,c); diff --git a/coreutils/tty.c b/coreutils/tty.c index 924aff2d5..eb8c3dd0f 100644 --- a/coreutils/tty.c +++ b/coreutils/tty.c @@ -21,7 +21,7 @@ int tty_main(int argc, char **argv) int silent; /* Note: No longer relevant in SUSv3. */ int retval; - bb_default_error_retval = 2; /* SUSv3 requires > 1 for error. */ + xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ silent = bb_getopt_ulflags(argc, argv, "s"); diff --git a/editors/sed.c b/editors/sed.c index 94dc820be..201665209 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -725,7 +725,7 @@ static int puts_maybe_newline(char *s, FILE *file, int missing_newline, int no_n if(!no_newline) fputc('\n',file); if(ferror(file)) { - bb_default_error_retval = 4; /* It's what gnu sed exits with... */ + xfunc_error_retval = 4; /* It's what gnu sed exits with... */ bb_error_msg_and_die(bb_msg_write_error); } diff --git a/include/libbb.h b/include/libbb.h index 73a2563c6..c0de92190 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -421,7 +421,7 @@ extern const char bb_default_login_shell[]; extern const char bb_path_mtab_file[]; -extern int bb_default_error_retval; +extern int xfunc_error_retval; #ifdef CONFIG_FEATURE_DEVFS # define CURRENT_VC "/dev/vc/0" diff --git a/libbb/default_error_retval.c b/libbb/default_error_retval.c index ff48a674a..f4e46a4b5 100644 --- a/libbb/default_error_retval.c +++ b/libbb/default_error_retval.c @@ -16,4 +16,4 @@ #include <stdlib.h> #include "libbb.h" -int bb_default_error_retval = EXIT_FAILURE; +int xfunc_error_retval = EXIT_FAILURE; diff --git a/libbb/error_msg_and_die.c b/libbb/error_msg_and_die.c index 29a260bde..10d953513 100644 --- a/libbb/error_msg_and_die.c +++ b/libbb/error_msg_and_die.c @@ -24,5 +24,5 @@ void bb_error_msg_and_die(const char *s, ...) va_end(p); if (die_sleep) sleep(die_sleep); - exit(bb_default_error_retval); + exit(xfunc_error_retval); } diff --git a/libbb/fflush_stdout_and_exit.c b/libbb/fflush_stdout_and_exit.c index 245f50864..6df8dde13 100644 --- a/libbb/fflush_stdout_and_exit.c +++ b/libbb/fflush_stdout_and_exit.c @@ -18,7 +18,7 @@ void bb_fflush_stdout_and_exit(int retval) { if (fflush(stdout)) { - retval = bb_default_error_retval; + retval = xfunc_error_retval; } if (die_sleep) sleep(die_sleep); diff --git a/libbb/herror_msg_and_die.c b/libbb/herror_msg_and_die.c index f115c8e0a..f62ddd2ea 100644 --- a/libbb/herror_msg_and_die.c +++ b/libbb/herror_msg_and_die.c @@ -21,5 +21,5 @@ void bb_herror_msg_and_die(const char *s, ...) va_end(p); if (die_sleep) sleep(die_sleep); - exit(bb_default_error_retval); + exit(xfunc_error_retval); } diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c index c1cfb956f..2303ba211 100644 --- a/libbb/perror_msg_and_die.c +++ b/libbb/perror_msg_and_die.c @@ -22,5 +22,5 @@ void bb_perror_msg_and_die(const char *s, ...) va_end(p); if (die_sleep) sleep(die_sleep); - exit(bb_default_error_retval); + exit(xfunc_error_retval); } diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 4aa1c3000..f1d4486c3 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -414,7 +414,7 @@ void xprint_and_close_file(FILE *file) { // copyfd outputs error messages for us. if (bb_copyfd_eof(fileno(file), 1) == -1) - exit(bb_default_error_retval); + exit(xfunc_error_retval); fclose(file); } diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 3706f9fd8..a3bfd495d 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -269,7 +269,7 @@ static int GetReplaceStream(const char *user, const char *file) if (ChangeUser(user, 0) < 0) exit(0); - bb_default_error_retval = 0; + xfunc_error_retval = 0; fd = xopen(file, O_RDONLY); buf[0] = 0; write(filedes[1], buf, 1); diff --git a/networking/arping.c b/networking/arping.c index c63ec91af..f84c8a75c 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -295,7 +295,7 @@ int arping_main(int argc, char **argv) target = *argv; - bb_default_error_retval = 2; + xfunc_error_retval = 2; { struct ifreq ifr; |