diff options
| author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-03 20:28:06 +0000 |
|---|---|---|
| committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-03 20:28:06 +0000 |
| commit | 1fa12c6ebcb25e2924778bcbaae4bea1af7b7e6a (patch) | |
| tree | 1bf7d7300ac410608a50b2c402966d492373ff24 | |
| parent | b816238d1a23646f04fe75c44fbb0a9da1eb1e76 (diff) | |
| download | busybox-w32-1fa12c6ebcb25e2924778bcbaae4bea1af7b7e6a.tar.gz busybox-w32-1fa12c6ebcb25e2924778bcbaae4bea1af7b7e6a.tar.bz2 busybox-w32-1fa12c6ebcb25e2924778bcbaae4bea1af7b7e6a.zip | |
rename bb_default_error_retval -> xfunc_error_retval
git-svn-id: svn://busybox.net/trunk/busybox@16304 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -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) | |||
| 443 | applet_using->name, usage_string); | 443 | applet_using->name, usage_string); |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | exit (bb_default_error_retval); | 446 | exit(xfunc_error_retval); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | static int applet_name_compare(const void *name, const void *vapplet) | 449 | 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) | |||
| 31 | return fp; | 31 | return fp; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | exit(bb_default_error_retval); /* We already output an error message. */ | 34 | exit(xfunc_error_retval); /* We already output an error message. */ |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | static const char fmt_eof[] = "cmp: EOF on %s\n"; | 37 | static const char fmt_eof[] = "cmp: EOF on %s\n"; |
| @@ -52,7 +52,7 @@ int cmp_main(int argc, char **argv) | |||
| 52 | unsigned opt; | 52 | unsigned opt; |
| 53 | int retval = 0; | 53 | int retval = 0; |
| 54 | 54 | ||
| 55 | bb_default_error_retval = 2; /* 1 is returned if files are different. */ | 55 | xfunc_error_retval = 2; /* 1 is returned if files are different. */ |
| 56 | 56 | ||
| 57 | opt = bb_getopt_ulflags(argc, argv, opt_chars); | 57 | opt = bb_getopt_ulflags(argc, argv, opt_chars); |
| 58 | 58 | ||
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 @@ | |||
| 26 | * - correct "-" option usage | 26 | * - correct "-" option usage |
| 27 | * - multiple "-u unsetenv" support | 27 | * - multiple "-u unsetenv" support |
| 28 | * - GNU long option support | 28 | * - GNU long option support |
| 29 | * - use bb_default_error_retval | 29 | * - use xfunc_error_retval |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | #include "busybox.h" | 32 | #include "busybox.h" |
| @@ -82,7 +82,7 @@ int env_main(int argc, char** argv) | |||
| 82 | if (*argv) { | 82 | if (*argv) { |
| 83 | execvp(*argv, argv); | 83 | execvp(*argv, argv); |
| 84 | /* SUSv3-mandated exit codes. */ | 84 | /* SUSv3-mandated exit codes. */ |
| 85 | bb_default_error_retval = (errno == ENOENT) ? 127 : 126; | 85 | xfunc_error_retval = (errno == ENOENT) ? 127 : 126; |
| 86 | bb_perror_msg_and_die("%s", *argv); | 86 | bb_perror_msg_and_die("%s", *argv); |
| 87 | } | 87 | } |
| 88 | 88 | ||
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) | |||
| 67 | execvp(*argv, argv); /* Now exec the desired program. */ | 67 | execvp(*argv, argv); /* Now exec the desired program. */ |
| 68 | 68 | ||
| 69 | /* The exec failed... */ | 69 | /* The exec failed... */ |
| 70 | bb_default_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */ | 70 | xfunc_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */ |
| 71 | bb_perror_msg_and_die("%s", *argv); | 71 | bb_perror_msg_and_die("%s", *argv); |
| 72 | } | 72 | } |
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) | |||
| 17 | int temp, nullfd; | 17 | int temp, nullfd; |
| 18 | char *nohupout, *home = NULL; | 18 | char *nohupout, *home = NULL; |
| 19 | 19 | ||
| 20 | bb_default_error_retval = 127; | 20 | xfunc_error_retval = 127; |
| 21 | 21 | ||
| 22 | if (argc<2) bb_show_usage(); | 22 | if (argc<2) bb_show_usage(); |
| 23 | 23 | ||
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) | |||
| 225 | char *line,**lines=NULL,*optlist="ngMucszbrdfimS:T:o:k:t:"; | 225 | char *line,**lines=NULL,*optlist="ngMucszbrdfimS:T:o:k:t:"; |
| 226 | int c; | 226 | int c; |
| 227 | 227 | ||
| 228 | bb_default_error_retval = 2; | 228 | xfunc_error_retval = 2; |
| 229 | /* Parse command line options */ | 229 | /* Parse command line options */ |
| 230 | while((c=getopt(argc,argv,optlist))>0) { | 230 | while((c=getopt(argc,argv,optlist))>0) { |
| 231 | line=strchr(optlist,c); | 231 | 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) | |||
| 21 | int silent; /* Note: No longer relevant in SUSv3. */ | 21 | int silent; /* Note: No longer relevant in SUSv3. */ |
| 22 | int retval; | 22 | int retval; |
| 23 | 23 | ||
| 24 | bb_default_error_retval = 2; /* SUSv3 requires > 1 for error. */ | 24 | xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */ |
| 25 | 25 | ||
| 26 | silent = bb_getopt_ulflags(argc, argv, "s"); | 26 | silent = bb_getopt_ulflags(argc, argv, "s"); |
| 27 | 27 | ||
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 | |||
| 725 | if(!no_newline) fputc('\n',file); | 725 | if(!no_newline) fputc('\n',file); |
| 726 | 726 | ||
| 727 | if(ferror(file)) { | 727 | if(ferror(file)) { |
| 728 | bb_default_error_retval = 4; /* It's what gnu sed exits with... */ | 728 | xfunc_error_retval = 4; /* It's what gnu sed exits with... */ |
| 729 | bb_error_msg_and_die(bb_msg_write_error); | 729 | bb_error_msg_and_die(bb_msg_write_error); |
| 730 | } | 730 | } |
| 731 | 731 | ||
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[]; | |||
| 421 | 421 | ||
| 422 | extern const char bb_path_mtab_file[]; | 422 | extern const char bb_path_mtab_file[]; |
| 423 | 423 | ||
| 424 | extern int bb_default_error_retval; | 424 | extern int xfunc_error_retval; |
| 425 | 425 | ||
| 426 | #ifdef CONFIG_FEATURE_DEVFS | 426 | #ifdef CONFIG_FEATURE_DEVFS |
| 427 | # define CURRENT_VC "/dev/vc/0" | 427 | # 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 @@ | |||
| 16 | #include <stdlib.h> | 16 | #include <stdlib.h> |
| 17 | #include "libbb.h" | 17 | #include "libbb.h" |
| 18 | 18 | ||
| 19 | int bb_default_error_retval = EXIT_FAILURE; | 19 | 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, ...) | |||
| 24 | va_end(p); | 24 | va_end(p); |
| 25 | if (die_sleep) | 25 | if (die_sleep) |
| 26 | sleep(die_sleep); | 26 | sleep(die_sleep); |
| 27 | exit(bb_default_error_retval); | 27 | exit(xfunc_error_retval); |
| 28 | } | 28 | } |
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 @@ | |||
| 18 | void bb_fflush_stdout_and_exit(int retval) | 18 | void bb_fflush_stdout_and_exit(int retval) |
| 19 | { | 19 | { |
| 20 | if (fflush(stdout)) { | 20 | if (fflush(stdout)) { |
| 21 | retval = bb_default_error_retval; | 21 | retval = xfunc_error_retval; |
| 22 | } | 22 | } |
| 23 | if (die_sleep) | 23 | if (die_sleep) |
| 24 | sleep(die_sleep); | 24 | 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, ...) | |||
| 21 | va_end(p); | 21 | va_end(p); |
| 22 | if (die_sleep) | 22 | if (die_sleep) |
| 23 | sleep(die_sleep); | 23 | sleep(die_sleep); |
| 24 | exit(bb_default_error_retval); | 24 | exit(xfunc_error_retval); |
| 25 | } | 25 | } |
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, ...) | |||
| 22 | va_end(p); | 22 | va_end(p); |
| 23 | if (die_sleep) | 23 | if (die_sleep) |
| 24 | sleep(die_sleep); | 24 | sleep(die_sleep); |
| 25 | exit(bb_default_error_retval); | 25 | exit(xfunc_error_retval); |
| 26 | } | 26 | } |
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) | |||
| 414 | { | 414 | { |
| 415 | // copyfd outputs error messages for us. | 415 | // copyfd outputs error messages for us. |
| 416 | if (bb_copyfd_eof(fileno(file), 1) == -1) | 416 | if (bb_copyfd_eof(fileno(file), 1) == -1) |
| 417 | exit(bb_default_error_retval); | 417 | exit(xfunc_error_retval); |
| 418 | 418 | ||
| 419 | fclose(file); | 419 | fclose(file); |
| 420 | } | 420 | } |
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) | |||
| 269 | if (ChangeUser(user, 0) < 0) | 269 | if (ChangeUser(user, 0) < 0) |
| 270 | exit(0); | 270 | exit(0); |
| 271 | 271 | ||
| 272 | bb_default_error_retval = 0; | 272 | xfunc_error_retval = 0; |
| 273 | fd = xopen(file, O_RDONLY); | 273 | fd = xopen(file, O_RDONLY); |
| 274 | buf[0] = 0; | 274 | buf[0] = 0; |
| 275 | write(filedes[1], buf, 1); | 275 | 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) | |||
| 295 | 295 | ||
| 296 | target = *argv; | 296 | target = *argv; |
| 297 | 297 | ||
| 298 | bb_default_error_retval = 2; | 298 | xfunc_error_retval = 2; |
| 299 | 299 | ||
| 300 | { | 300 | { |
| 301 | struct ifreq ifr; | 301 | struct ifreq ifr; |
