Stop using TRUE and FALSE for exit status.
This commit is contained in:
parent
b558e76eb1
commit
3e856ce428
2
ar.c
2
ar.c
@ -387,5 +387,5 @@ extern int ar_main(int argc, char **argv)
|
||||
}
|
||||
extractList=extractList->next;
|
||||
}
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -387,5 +387,5 @@ extern int ar_main(int argc, char **argv)
|
||||
}
|
||||
extractList=extractList->next;
|
||||
}
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -1350,7 +1350,7 @@ int gunzip_main(int argc, char **argv)
|
||||
|
||||
if (delInputFile == 1 && unlink(delFileName) < 0) {
|
||||
perror(delFileName);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
return(exit_code);
|
||||
|
@ -1930,7 +1930,7 @@ int gzip_main(int argc, char **argv)
|
||||
|
||||
if (unlink(delFileName) < 0) {
|
||||
perror(delFileName);
|
||||
exit(FALSE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,7 @@ extern int tar_main(int argc, char **argv)
|
||||
int tostdoutFlag = FALSE;
|
||||
int firstOpt = TRUE;
|
||||
int stopIt;
|
||||
int status;
|
||||
|
||||
|
||||
if (argc <= 1)
|
||||
@ -227,16 +228,21 @@ extern int tar_main(int argc, char **argv)
|
||||
#ifndef BB_FEATURE_TAR_CREATE
|
||||
fatalError( "This version of tar was not compiled with tar creation support.\n");
|
||||
#else
|
||||
exit(writeTarFile(tarName, verboseFlag, argv, excludeList));
|
||||
status = writeTarFile(tarName, verboseFlag, argv, excludeList);
|
||||
#endif
|
||||
}
|
||||
if (listFlag == TRUE || extractFlag == TRUE) {
|
||||
if (*argv)
|
||||
extractList = argv;
|
||||
exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag,
|
||||
verboseFlag, extractList, excludeList));
|
||||
status = readTarFile(tarName, extractFlag, listFlag, tostdoutFlag,
|
||||
verboseFlag, extractList, excludeList);
|
||||
}
|
||||
|
||||
if (status == TRUE)
|
||||
return EXIT_SUCCESS;
|
||||
else
|
||||
return EXIT_FAILURE;
|
||||
|
||||
flagError:
|
||||
fatalError( "Exactly one of 'c', 'x' or 't' must be specified\n");
|
||||
}
|
||||
|
@ -45,5 +45,5 @@ extern int basename_main(int argc, char **argv)
|
||||
s[m-n] = '\0';
|
||||
}
|
||||
printf("%s\n", s);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -161,9 +161,9 @@ int chmod_chown_chgrp_main(int argc, char **argv)
|
||||
while (argc-- > 1) {
|
||||
if (recursiveAction (*(++argv), recursiveFlag, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL) == FALSE)
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
bad_group:
|
||||
fatalError( "unknown group name: %s\n", groupName);
|
||||
|
2
chroot.c
2
chroot.c
@ -54,7 +54,7 @@ int chroot_main(int argc, char **argv)
|
||||
execlp(prog, prog, NULL);
|
||||
#else
|
||||
shell_main(argc, argv);
|
||||
exit (0);
|
||||
return EXIT_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
fatalError("cannot execute %s: %s\n", prog, strerror(errno));
|
||||
|
6
chvt.c
6
chvt.c
@ -25,13 +25,13 @@ int chvt_main(int argc, char **argv)
|
||||
num = atoi(argv[1]);
|
||||
if (ioctl(fd, VT_ACTIVATE, num)) {
|
||||
perror("VT_ACTIVATE");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (ioctl(fd, VT_WAITACTIVE, num)) {
|
||||
perror("VT_WAITACTIVE");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
2
clear.c
2
clear.c
@ -29,5 +29,5 @@
|
||||
extern int clear_main(int argc, char **argv)
|
||||
{
|
||||
printf("\033[H\033[J");
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ void clean_up_and_die(int sig)
|
||||
cmdedit_reset_term();
|
||||
fprintf(stdout, "\n");
|
||||
if (sig!=SIGINT)
|
||||
exit(TRUE);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* Go to HOME position */
|
||||
|
2
cmp.c
2
cmp.c
@ -54,7 +54,7 @@ int cmp_main(int argc, char **argv)
|
||||
else
|
||||
printf("%s %s differ: char %d, line %d\n", filename1, filename2,
|
||||
char_pos, line_pos);
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
char_pos++;
|
||||
if (c1 == '\n')
|
||||
|
@ -25,13 +25,13 @@ int chvt_main(int argc, char **argv)
|
||||
num = atoi(argv[1]);
|
||||
if (ioctl(fd, VT_ACTIVATE, num)) {
|
||||
perror("VT_ACTIVATE");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (ioctl(fd, VT_WAITACTIVE, num)) {
|
||||
perror("VT_WAITACTIVE");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,5 +29,5 @@
|
||||
extern int clear_main(int argc, char **argv)
|
||||
{
|
||||
printf("\033[H\033[J");
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ printf("erik: A\n");
|
||||
/* deallocate all unused consoles */
|
||||
if (ioctl(fd, VT_DISALLOCATE, 0)) {
|
||||
perror("VT_DISALLOCATE");
|
||||
exit( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
} else
|
||||
printf("erik: B\n");
|
||||
@ -44,5 +44,5 @@ printf("erik: B\n");
|
||||
}
|
||||
}
|
||||
printf("erik: C\n");
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ int dumpkmap_main(int argc, char **argv)
|
||||
fd = open("/dev/tty0", O_RDWR);
|
||||
if (fd < 0) {
|
||||
errorMsg("Error opening /dev/tty0: %s\n", strerror(errno));
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
write(1, magic, 7);
|
||||
@ -88,5 +88,5 @@ int dumpkmap_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -40,17 +40,17 @@ int loadacm_main(int argc, char **argv)
|
||||
fd = open("/dev/tty", O_RDWR);
|
||||
if (fd < 0) {
|
||||
errorMsg("Error opening /dev/tty1: %s\n", strerror(errno));
|
||||
return( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (screen_map_load(fd, stdin)) {
|
||||
errorMsg("Error loading acm: %s\n", strerror(errno));
|
||||
return( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
write(fd, "\033(K", 3);
|
||||
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
int screen_map_load(int fd, FILE * fp)
|
||||
|
@ -29,6 +29,6 @@
|
||||
extern int reset_main(int argc, char **argv)
|
||||
{
|
||||
printf("\033c");
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -68,5 +68,5 @@ setkeycodes_main(int argc, char** argv)
|
||||
argc -= 2;
|
||||
argv += 2;
|
||||
}
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -45,5 +45,5 @@ extern int basename_main(int argc, char **argv)
|
||||
s[m-n] = '\0';
|
||||
}
|
||||
printf("%s\n", s);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ int chroot_main(int argc, char **argv)
|
||||
execlp(prog, prog, NULL);
|
||||
#else
|
||||
shell_main(argc, argv);
|
||||
exit (0);
|
||||
return EXIT_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
fatalError("cannot execute %s: %s\n", prog, strerror(errno));
|
||||
|
@ -54,7 +54,7 @@ int cmp_main(int argc, char **argv)
|
||||
else
|
||||
printf("%s %s differ: char %d, line %d\n", filename1, filename2,
|
||||
char_pos, line_pos);
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
char_pos++;
|
||||
if (c1 == '\n')
|
||||
|
@ -241,5 +241,5 @@ extern int cut_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ int date_main(int argc, char **argv)
|
||||
} else if (*date_fmt == '\0') {
|
||||
/* Imitate what GNU 'date' does with NO format string! */
|
||||
printf("\n");
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* Handle special conversions */
|
||||
@ -246,5 +246,5 @@ int date_main(int argc, char **argv)
|
||||
strftime(t_buff, 200, date_fmt, &tm_time);
|
||||
printf("%s\n", t_buff);
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ extern int dd_main(int argc, char **argv)
|
||||
(inTotal % blockSize) != 0);
|
||||
printf("%ld+%d records out\n", (long) (outTotal / blockSize),
|
||||
(outTotal % blockSize) != 0);
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
usage:
|
||||
|
||||
usage(dd_usage);
|
||||
|
@ -79,12 +79,12 @@ extern int df_main(int argc, char **argv)
|
||||
exit(FALSE);
|
||||
}
|
||||
status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir);
|
||||
if (status != 0)
|
||||
exit(status);
|
||||
if (status != TRUE)
|
||||
return EXIT_FAILURE;
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
FILE *mountTable;
|
||||
struct mntent *mountEntry;
|
||||
@ -92,7 +92,7 @@ extern int df_main(int argc, char **argv)
|
||||
mountTable = setmntent(mtab_file, "r");
|
||||
if (mountTable == 0) {
|
||||
perror(mtab_file);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
while ((mountEntry = getmntent(mountTable))) {
|
||||
@ -101,7 +101,7 @@ extern int df_main(int argc, char **argv)
|
||||
endmntent(mountTable);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -40,5 +40,5 @@ extern int dirname_main(int argc, char **argv)
|
||||
if (s && *s)
|
||||
*s = '\0';
|
||||
printf("%s\n", (s)? *argv : ".");
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -41,5 +41,5 @@ int dos2unix_main( int argc, char **argv ) {
|
||||
putchar(c);
|
||||
c = getchar();
|
||||
}
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -160,10 +160,10 @@ int du_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* $Id: du.c,v 1.25 2000/09/25 21:45:57 andersen Exp $ */
|
||||
/* $Id: du.c,v 1.26 2000/12/01 02:55:13 kraai Exp $ */
|
||||
/*
|
||||
Local Variables:
|
||||
c-file-style: "linux"
|
||||
|
@ -107,7 +107,7 @@ just_echo:
|
||||
putchar('\n');
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/*-
|
||||
|
@ -26,5 +26,5 @@
|
||||
extern int hostid_main(int argc, char **argv)
|
||||
{
|
||||
printf("%lx\n", gethostid());
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -9,5 +9,5 @@ extern int length_main(int argc, char **argv)
|
||||
if (argc != 2 || **(argv + 1) == '-')
|
||||
usage(length_usage);
|
||||
printf("%lu\n", (long)strlen(argv[1]));
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -878,5 +878,4 @@ extern int ls_main(int argc, char **argv)
|
||||
|
||||
print_usage_message:
|
||||
usage(ls_usage);
|
||||
return(FALSE);
|
||||
}
|
||||
|
@ -902,22 +902,22 @@ int md5sum_main(int argc,
|
||||
|
||||
if (file_type_specified && do_check) {
|
||||
errorMsg("the -b and -t options are meaningless when verifying checksums\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (n_strings > 0 && do_check) {
|
||||
errorMsg("the -g and -c options are mutually exclusive\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (status_only && !do_check) {
|
||||
errorMsg("the -s option is meaningful only when verifying checksums\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (warn && !do_check) {
|
||||
errorMsg("the -w option is meaningful only when verifying checksums\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (n_strings > 0) {
|
||||
@ -925,7 +925,7 @@ int md5sum_main(int argc,
|
||||
|
||||
if (optind < argc) {
|
||||
errorMsg("no files may be specified when using -g\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
for (i = 0; i < n_strings; ++i) {
|
||||
size_t cnt;
|
||||
@ -992,13 +992,16 @@ int md5sum_main(int argc,
|
||||
|
||||
if (fclose (stdout) == EOF) {
|
||||
errorMsg("write error\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (have_read_stdin && fclose (stdin) == EOF) {
|
||||
errorMsg("standard input\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
exit (err == 0 ? TRUE : FALSE);
|
||||
if (err == 0)
|
||||
return EXIT_SUCCESS;
|
||||
else
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ extern int mkdir_main(int argc, char **argv)
|
||||
mode = 0;
|
||||
if (parse_mode(*(++argv), &mode) == FALSE) {
|
||||
errorMsg("Unknown mode: %s\n", *argv);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
/* Set the umask for this process so it doesn't
|
||||
* screw up whatever the user just entered. */
|
||||
@ -80,13 +80,13 @@ extern int mkdir_main(int argc, char **argv)
|
||||
|
||||
if (strlen(*argv) > BUFSIZ - 1) {
|
||||
errorMsg(name_too_long);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
strcpy(buf, *argv);
|
||||
status = stat(buf, &statBuf);
|
||||
if (parentFlag == FALSE && status != -1 && errno != ENOENT) {
|
||||
errorMsg("%s: File exists\n", buf);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (parentFlag == TRUE) {
|
||||
strcat(buf, "/");
|
||||
@ -94,11 +94,11 @@ extern int mkdir_main(int argc, char **argv)
|
||||
} else {
|
||||
if (mkdir(buf, mode) != 0 && parentFlag == FALSE) {
|
||||
perror(buf);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ extern int mkfifo_main(int argc, char **argv)
|
||||
usage(mkfifo_usage);
|
||||
if (mkfifo(*argv, mode) < 0) {
|
||||
perror("mkfifo");
|
||||
exit(255);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -85,6 +85,6 @@ int mknod_main(int argc, char **argv)
|
||||
|
||||
if (mknod(argv[0], mode, dev) != 0)
|
||||
fatalError("%s: %s\n", argv[0], strerror(errno));
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -34,5 +34,5 @@ extern int pwd_main(int argc, char **argv)
|
||||
fatalError("%s\n", strerror(errno));
|
||||
|
||||
printf("%s\n", buf);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -102,9 +102,9 @@ extern int rm_main(int argc, char **argv)
|
||||
} else {
|
||||
if (recursiveAction(srcName, recursiveFlag, FALSE,
|
||||
TRUE, fileAction, dirAction, NULL) == FALSE) {
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ extern int sleep_main(int argc, char **argv)
|
||||
|
||||
if (sleep(atoi(*(++argv))) != 0) {
|
||||
perror("sleep");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ extern int touch_main(int argc, char **argv)
|
||||
break;
|
||||
default:
|
||||
usage(touch_usage);
|
||||
exit(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -57,7 +56,7 @@ extern int touch_main(int argc, char **argv)
|
||||
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
if (fd < 0) {
|
||||
if (create == FALSE && errno == ENOENT)
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
else {
|
||||
fatalError("%s", strerror(errno));
|
||||
}
|
||||
@ -70,5 +69,5 @@ extern int touch_main(int argc, char **argv)
|
||||
argv++;
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -38,5 +38,5 @@ extern int tty_main(int argc, char **argv)
|
||||
else
|
||||
puts("not a tty");
|
||||
}
|
||||
return(isatty(0) ? TRUE : FALSE);
|
||||
return(isatty(0) ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ int uname_main(int argc, char **argv)
|
||||
print_element(PRINT_MACHINE, name.machine);
|
||||
print_element(PRINT_PROCESSOR, processor);
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* If the name element set in MASK is selected for printing in `toprint',
|
||||
|
@ -32,5 +32,5 @@ extern int usleep_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
usleep(atoi(*(++argv))); /* return void */
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -294,16 +294,16 @@ int uudecode_main (int argc,
|
||||
}
|
||||
|
||||
if (optind == argc)
|
||||
exit_status = decode ("stdin", outname) == 0 ? TRUE : FALSE;
|
||||
exit_status = decode ("stdin", outname) == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
else {
|
||||
exit_status = TRUE;
|
||||
exit_status = EXIT_SUCCESS;
|
||||
do {
|
||||
if (freopen (argv[optind], "r", stdin) != NULL) {
|
||||
if (decode (argv[optind], outname) != 0)
|
||||
exit_status = FALSE;
|
||||
} else {
|
||||
errorMsg("%s: %s\n", argv[optind], strerror(errno));
|
||||
exit_status = FALSE;
|
||||
exit_status = EXIT_FAILURE;
|
||||
}
|
||||
optind++;
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ int uuencode_main (int argc,
|
||||
/* Optional first argument is input file. */
|
||||
if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin), &sb)) {
|
||||
errorMsg("%s: %s\n", argv[optind], strerror(errno));
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
optind++;
|
||||
@ -200,9 +200,9 @@ int uuencode_main (int argc,
|
||||
printf(trans_ptr == uu_std ? "end\n" : "====\n");
|
||||
if (ferror (stdout)) {
|
||||
errorMsg("Write error\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* Copyright (c) 1983 Regents of the University of California.
|
||||
|
4
cp_mv.c
4
cp_mv.c
@ -316,9 +316,9 @@ extern int cp_mv_main(int argc, char **argv)
|
||||
if (flags_memo)
|
||||
*(baseDestName + baseDestLen) = '\0';
|
||||
}
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
exit_false:
|
||||
return( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
2
cut.c
2
cut.c
@ -241,5 +241,5 @@ extern int cut_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
4
date.c
4
date.c
@ -232,7 +232,7 @@ int date_main(int argc, char **argv)
|
||||
} else if (*date_fmt == '\0') {
|
||||
/* Imitate what GNU 'date' does with NO format string! */
|
||||
printf("\n");
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* Handle special conversions */
|
||||
@ -246,5 +246,5 @@ int date_main(int argc, char **argv)
|
||||
strftime(t_buff, 200, date_fmt, &tm_time);
|
||||
printf("%s\n", t_buff);
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
19
dc.c
19
dc.c
@ -13,19 +13,15 @@ static unsigned int pointer;
|
||||
|
||||
static void push(double a)
|
||||
{
|
||||
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
|
||||
errorMsg("stack overflow\n");
|
||||
exit(-1);
|
||||
} else
|
||||
stack[pointer++] = a;
|
||||
if (pointer >= (sizeof(stack) / sizeof(*stack)))
|
||||
fatalError("stack overflow\n");
|
||||
stack[pointer++] = a;
|
||||
}
|
||||
|
||||
static double pop()
|
||||
{
|
||||
if (pointer == 0) {
|
||||
errorMsg("stack underflow\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (pointer == 0)
|
||||
fatalError("stack underflow\n");
|
||||
return stack[--pointer];
|
||||
}
|
||||
|
||||
@ -124,8 +120,7 @@ static void stack_machine(const char *argument)
|
||||
}
|
||||
o++;
|
||||
}
|
||||
errorMsg("%s: syntax error.\n", argument);
|
||||
exit(-1);
|
||||
fatalError("%s: syntax error.\n", argument);
|
||||
}
|
||||
|
||||
/* return pointer to next token in buffer and set *buffer to one char
|
||||
@ -182,5 +177,5 @@ int dc_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
stack_machine(0);
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
2
dd.c
2
dd.c
@ -174,7 +174,7 @@ extern int dd_main(int argc, char **argv)
|
||||
(inTotal % blockSize) != 0);
|
||||
printf("%ld+%d records out\n", (long) (outTotal / blockSize),
|
||||
(outTotal % blockSize) != 0);
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
usage:
|
||||
|
||||
usage(dd_usage);
|
||||
|
@ -28,7 +28,7 @@ printf("erik: A\n");
|
||||
/* deallocate all unused consoles */
|
||||
if (ioctl(fd, VT_DISALLOCATE, 0)) {
|
||||
perror("VT_DISALLOCATE");
|
||||
exit( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
} else
|
||||
printf("erik: B\n");
|
||||
@ -44,5 +44,5 @@ printf("erik: B\n");
|
||||
}
|
||||
}
|
||||
printf("erik: C\n");
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
10
df.c
10
df.c
@ -79,12 +79,12 @@ extern int df_main(int argc, char **argv)
|
||||
exit(FALSE);
|
||||
}
|
||||
status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir);
|
||||
if (status != 0)
|
||||
exit(status);
|
||||
if (status != TRUE)
|
||||
return EXIT_FAILURE;
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
FILE *mountTable;
|
||||
struct mntent *mountEntry;
|
||||
@ -92,7 +92,7 @@ extern int df_main(int argc, char **argv)
|
||||
mountTable = setmntent(mtab_file, "r");
|
||||
if (mountTable == 0) {
|
||||
perror(mtab_file);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
while ((mountEntry = getmntent(mountTable))) {
|
||||
@ -101,7 +101,7 @@ extern int df_main(int argc, char **argv)
|
||||
endmntent(mountTable);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -40,5 +40,5 @@ extern int dirname_main(int argc, char **argv)
|
||||
if (s && *s)
|
||||
*s = '\0';
|
||||
printf("%s\n", (s)? *argv : ".");
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
8
dmesg.c
8
dmesg.c
@ -73,7 +73,7 @@ int dmesg_main(int argc, char **argv)
|
||||
if (n < 0) {
|
||||
goto klogctl_error;
|
||||
}
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (bufsize < 4096)
|
||||
@ -98,11 +98,11 @@ int dmesg_main(int argc, char **argv)
|
||||
}
|
||||
if (lastc != '\n')
|
||||
putchar('\n');
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
end:
|
||||
usage(dmesg_usage);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
klogctl_error:
|
||||
perror("klogctl");
|
||||
return(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -41,5 +41,5 @@ int dos2unix_main( int argc, char **argv ) {
|
||||
putchar(c);
|
||||
c = getchar();
|
||||
}
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
4
du.c
4
du.c
@ -160,10 +160,10 @@ int du_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* $Id: du.c,v 1.25 2000/09/25 21:45:57 andersen Exp $ */
|
||||
/* $Id: du.c,v 1.26 2000/12/01 02:55:13 kraai Exp $ */
|
||||
/*
|
||||
Local Variables:
|
||||
c-file-style: "linux"
|
||||
|
@ -51,7 +51,7 @@ int dumpkmap_main(int argc, char **argv)
|
||||
fd = open("/dev/tty0", O_RDWR);
|
||||
if (fd < 0) {
|
||||
errorMsg("Error opening /dev/tty0: %s\n", strerror(errno));
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
write(1, magic, 7);
|
||||
@ -88,5 +88,5 @@ int dumpkmap_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
2
dutmp.c
2
dutmp.c
@ -62,5 +62,5 @@ extern int dutmp_main(int argc, char **argv)
|
||||
ut.ut_addr);
|
||||
}
|
||||
#endif
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
2
echo.c
2
echo.c
@ -107,7 +107,7 @@ just_echo:
|
||||
putchar('\n');
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/*-
|
||||
|
4
fbset.c
4
fbset.c
@ -434,7 +434,7 @@ extern int fbset_main(int argc, char **argv)
|
||||
if (g_options & OPT_READMODE) {
|
||||
if (!readmode(&var, modefile, mode)) {
|
||||
errorMsg("Unknown video mode `%s'\n", mode);
|
||||
exit(1);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -446,5 +446,5 @@ extern int fbset_main(int argc, char **argv)
|
||||
/* Don't close the file, as exiting will take care of that */
|
||||
/* close(fh); */
|
||||
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ extern int fdflush_main(int argc, char **argv)
|
||||
fd = open(*argv, 0);
|
||||
if (fd < 0) {
|
||||
perror(*argv);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
value = ioctl(fd, FDFLUSH, 0);
|
||||
@ -50,7 +50,7 @@ extern int fdflush_main(int argc, char **argv)
|
||||
|
||||
if (value) {
|
||||
perror(*argv);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
4
find.c
4
find.c
@ -100,8 +100,8 @@ int find_main(int argc, char **argv)
|
||||
|
||||
if (recursiveAction(directory, TRUE, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL) == FALSE) {
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -100,8 +100,8 @@ int find_main(int argc, char **argv)
|
||||
|
||||
if (recursiveAction(directory, TRUE, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL) == FALSE) {
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
2
free.c
2
free.c
@ -60,7 +60,7 @@ extern int free_main(int argc, char **argv)
|
||||
printf("%6s%13ld%13ld%13ld\n", "Total:", info.totalram+info.totalswap,
|
||||
(info.totalram-info.freeram)+(info.totalswap-info.freeswap),
|
||||
info.freeram+info.freeswap);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,7 +51,7 @@ freeramdisk_main(int argc, char **argv)
|
||||
/* Don't bother closing. Exit does
|
||||
* that, so we can save a few bytes */
|
||||
/* close(f); */
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
2
gunzip.c
2
gunzip.c
@ -1350,7 +1350,7 @@ int gunzip_main(int argc, char **argv)
|
||||
|
||||
if (delInputFile == 1 && unlink(delFileName) < 0) {
|
||||
perror(delFileName);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
return(exit_code);
|
||||
|
2
gzip.c
2
gzip.c
@ -1930,7 +1930,7 @@ int gzip_main(int argc, char **argv)
|
||||
|
||||
if (unlink(delFileName) < 0) {
|
||||
perror(delFileName);
|
||||
exit(FALSE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
2
hostid.c
2
hostid.c
@ -26,5 +26,5 @@
|
||||
extern int hostid_main(int argc, char **argv)
|
||||
{
|
||||
printf("%lx\n", gethostid());
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
12
insmod.c
12
insmod.c
@ -77,7 +77,7 @@
|
||||
#ifndef MODUTILS_MODULE_H
|
||||
#define MODUTILS_MODULE_H 1
|
||||
|
||||
#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $"
|
||||
#ident "$Id: insmod.c,v 1.29 2000/12/01 02:55:13 kraai Exp $"
|
||||
|
||||
/* This file contains the structures used by the 2.0 and 2.1 kernels.
|
||||
We do not use the kernel headers directly because we do not wish
|
||||
@ -283,7 +283,7 @@ int delete_module(const char *);
|
||||
#ifndef MODUTILS_OBJ_H
|
||||
#define MODUTILS_OBJ_H 1
|
||||
|
||||
#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $"
|
||||
#ident "$Id: insmod.c,v 1.29 2000/12/01 02:55:13 kraai Exp $"
|
||||
|
||||
/* The relocatable object is manipulated using elfin types. */
|
||||
|
||||
@ -2769,7 +2769,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
FILE *fp;
|
||||
struct obj_file *f;
|
||||
char m_name[BUFSIZ + 1] = "\0";
|
||||
int exit_status = FALSE;
|
||||
int exit_status = EXIT_FAILURE;
|
||||
int m_has_modinfo;
|
||||
#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING
|
||||
int k_version;
|
||||
@ -2833,7 +2833,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
|| ((fp = fopen(m_filename, "r")) == NULL))
|
||||
{
|
||||
errorMsg("No module named '%s' found in '%s'\n", m_fullName, _PATH_MODULES);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
} else
|
||||
fatalError("No module named '%s' found in '%s'\n", m_fullName, _PATH_MODULES);
|
||||
@ -2843,7 +2843,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
|
||||
if ((f = obj_load(fp)) == NULL) {
|
||||
perror("Could not load the module\n");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (get_modinfo_value(f, "kernel_version") == NULL)
|
||||
@ -2981,7 +2981,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
exit_status = TRUE;
|
||||
exit_status = EXIT_SUCCESS;
|
||||
|
||||
out:
|
||||
fclose(fp);
|
||||
|
7
kill.c
7
kill.c
@ -158,7 +158,7 @@ extern int kill_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "\n\n");
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
break;
|
||||
case '-':
|
||||
@ -236,11 +236,12 @@ extern int kill_main(int argc, char **argv)
|
||||
* upon exit, so we can save a byte or two */
|
||||
argv++;
|
||||
}
|
||||
exit (all_found);
|
||||
if (all_found == FALSE)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
|
||||
end:
|
||||
|
42
lash.c
42
lash.c
@ -217,11 +217,11 @@ static int builtin_cd(struct job *cmd, struct jobSet *junk)
|
||||
newdir = cmd->progs[0].argv[1];
|
||||
if (chdir(newdir)) {
|
||||
printf("cd: %s: %s\n", newdir, strerror(errno));
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
getcwd(cwd, sizeof(char)*MAX_LINE);
|
||||
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* built-in 'env' handler */
|
||||
@ -245,14 +245,14 @@ static int builtin_exec(struct job *cmd, struct jobSet *junk)
|
||||
fatalError("Exec to %s failed: %s\n", cmd->progs[0].argv[0],
|
||||
strerror(errno));
|
||||
}
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* built-in 'exit' handler */
|
||||
static int builtin_exit(struct job *cmd, struct jobSet *junk)
|
||||
{
|
||||
if (!cmd->progs[0].argv[1] == 1)
|
||||
exit TRUE;
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
exit (atoi(cmd->progs[0].argv[1]));
|
||||
}
|
||||
@ -267,12 +267,12 @@ static int builtin_fg_bg(struct job *cmd, struct jobSet *jobList)
|
||||
if (!cmd->progs[0].argv[1] || cmd->progs[0].argv[2]) {
|
||||
errorMsg("%s: exactly one argument is expected\n",
|
||||
cmd->progs[0].argv[0]);
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (sscanf(cmd->progs[0].argv[1], "%%%d", &jobNum) != 1) {
|
||||
errorMsg("%s: bad argument '%s'\n",
|
||||
cmd->progs[0].argv[0], cmd->progs[0].argv[1]);
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
for (job = jobList->head; job; job = job->next) {
|
||||
if (job->jobId == jobNum) {
|
||||
break;
|
||||
@ -286,7 +286,7 @@ static int builtin_fg_bg(struct job *cmd, struct jobSet *jobList)
|
||||
if (!job) {
|
||||
errorMsg("%s: unknown job %d\n",
|
||||
cmd->progs[0].argv[0], jobNum);
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (*cmd->progs[0].argv[0] == 'f') {
|
||||
@ -305,7 +305,7 @@ static int builtin_fg_bg(struct job *cmd, struct jobSet *jobList)
|
||||
|
||||
job->stoppedProgs = 0;
|
||||
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* built-in 'help' handler */
|
||||
@ -326,7 +326,7 @@ static int builtin_help(struct job *dummy, struct jobSet *junk)
|
||||
fprintf(stdout, "%s\t%s\n", x->cmd, x->descr);
|
||||
}
|
||||
fprintf(stdout, "\n\n");
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* built-in 'jobs' handler */
|
||||
@ -343,7 +343,7 @@ static int builtin_jobs(struct job *dummy, struct jobSet *jobList)
|
||||
|
||||
printf(JOB_STATUS_FORMAT, job->jobId, statusString, job->text);
|
||||
}
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@ -352,7 +352,7 @@ static int builtin_pwd(struct job *dummy, struct jobSet *junk)
|
||||
{
|
||||
getcwd(cwd, sizeof(char)*MAX_LINE);
|
||||
fprintf(stdout, "%s\n", cwd);
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* built-in 'export VAR=value' handler */
|
||||
@ -437,11 +437,11 @@ static int builtin_then(struct job *cmd, struct jobSet *junk)
|
||||
|
||||
if (! (cmd->jobContext & (IF_TRUE_CONTEXT|IF_FALSE_CONTEXT))) {
|
||||
errorMsg("unexpected token `then'\n");
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
/* If the if result was FALSE, skip the 'then' stuff */
|
||||
if (cmd->jobContext & IF_FALSE_CONTEXT) {
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
cmd->jobContext |= THEN_EXP_CONTEXT;
|
||||
@ -464,11 +464,11 @@ static int builtin_else(struct job *cmd, struct jobSet *junk)
|
||||
|
||||
if (! (cmd->jobContext & (IF_TRUE_CONTEXT|IF_FALSE_CONTEXT))) {
|
||||
errorMsg("unexpected token `else'\n");
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
/* If the if result was TRUE, skip the 'else' stuff */
|
||||
if (cmd->jobContext & IF_TRUE_CONTEXT) {
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
cmd->jobContext |= ELSE_EXP_CONTEXT;
|
||||
@ -488,12 +488,12 @@ static int builtin_fi(struct job *cmd, struct jobSet *junk)
|
||||
{
|
||||
if (! (cmd->jobContext & (IF_TRUE_CONTEXT|IF_FALSE_CONTEXT))) {
|
||||
errorMsg("unexpected token `fi'\n");
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
/* Clear out the if and then context bits */
|
||||
cmd->jobContext &= ~(IF_TRUE_CONTEXT|IF_FALSE_CONTEXT|THEN_EXP_CONTEXT|ELSE_EXP_CONTEXT);
|
||||
debug_printf(stderr, "Hit an fi -- jobContext=%d\n", cmd->jobContext);
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -504,13 +504,13 @@ static int builtin_source(struct job *cmd, struct jobSet *junk)
|
||||
int status;
|
||||
|
||||
if (!cmd->progs[0].argv[1] == 1)
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
|
||||
input = fopen(cmd->progs[0].argv[1], "r");
|
||||
if (!input) {
|
||||
fprintf(stdout, "Couldn't open file '%s'\n",
|
||||
cmd->progs[0].argv[1]);
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Now run the file */
|
||||
@ -524,10 +524,10 @@ static int builtin_unset(struct job *cmd, struct jobSet *junk)
|
||||
{
|
||||
if (!cmd->progs[0].argv[1] == 1) {
|
||||
fprintf(stdout, "unset: parameter required.\n");
|
||||
return FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
unsetenv(cmd->progs[0].argv[1]);
|
||||
return TRUE;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* free up all memory from a job */
|
||||
|
2
length.c
2
length.c
@ -9,5 +9,5 @@ extern int length_main(int argc, char **argv)
|
||||
if (argc != 2 || **(argv + 1) == '-')
|
||||
usage(length_usage);
|
||||
printf("%lu\n", (long)strlen(argv[1]));
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -40,17 +40,17 @@ int loadacm_main(int argc, char **argv)
|
||||
fd = open("/dev/tty", O_RDWR);
|
||||
if (fd < 0) {
|
||||
errorMsg("Error opening /dev/tty1: %s\n", strerror(errno));
|
||||
return( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (screen_map_load(fd, stdin)) {
|
||||
errorMsg("Error loading acm: %s\n", strerror(errno));
|
||||
return( FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
write(fd, "\033(K", 3);
|
||||
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
int screen_map_load(int fd, FILE * fp)
|
||||
|
1
ls.c
1
ls.c
@ -878,5 +878,4 @@ extern int ls_main(int argc, char **argv)
|
||||
|
||||
print_usage_message:
|
||||
usage(ls_usage);
|
||||
return(FALSE);
|
||||
}
|
||||
|
19
md5sum.c
19
md5sum.c
@ -902,22 +902,22 @@ int md5sum_main(int argc,
|
||||
|
||||
if (file_type_specified && do_check) {
|
||||
errorMsg("the -b and -t options are meaningless when verifying checksums\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (n_strings > 0 && do_check) {
|
||||
errorMsg("the -g and -c options are mutually exclusive\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (status_only && !do_check) {
|
||||
errorMsg("the -s option is meaningful only when verifying checksums\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (warn && !do_check) {
|
||||
errorMsg("the -w option is meaningful only when verifying checksums\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (n_strings > 0) {
|
||||
@ -925,7 +925,7 @@ int md5sum_main(int argc,
|
||||
|
||||
if (optind < argc) {
|
||||
errorMsg("no files may be specified when using -g\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
for (i = 0; i < n_strings; ++i) {
|
||||
size_t cnt;
|
||||
@ -992,13 +992,16 @@ int md5sum_main(int argc,
|
||||
|
||||
if (fclose (stdout) == EOF) {
|
||||
errorMsg("write error\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (have_read_stdin && fclose (stdin) == EOF) {
|
||||
errorMsg("standard input\n");
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
exit (err == 0 ? TRUE : FALSE);
|
||||
if (err == 0)
|
||||
return EXIT_SUCCESS;
|
||||
else
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
@ -13,19 +13,15 @@ static unsigned int pointer;
|
||||
|
||||
static void push(double a)
|
||||
{
|
||||
if (pointer >= (sizeof(stack) / sizeof(*stack))) {
|
||||
errorMsg("stack overflow\n");
|
||||
exit(-1);
|
||||
} else
|
||||
stack[pointer++] = a;
|
||||
if (pointer >= (sizeof(stack) / sizeof(*stack)))
|
||||
fatalError("stack overflow\n");
|
||||
stack[pointer++] = a;
|
||||
}
|
||||
|
||||
static double pop()
|
||||
{
|
||||
if (pointer == 0) {
|
||||
errorMsg("stack underflow\n");
|
||||
exit(-1);
|
||||
}
|
||||
if (pointer == 0)
|
||||
fatalError("stack underflow\n");
|
||||
return stack[--pointer];
|
||||
}
|
||||
|
||||
@ -124,8 +120,7 @@ static void stack_machine(const char *argument)
|
||||
}
|
||||
o++;
|
||||
}
|
||||
errorMsg("%s: syntax error.\n", argument);
|
||||
exit(-1);
|
||||
fatalError("%s: syntax error.\n", argument);
|
||||
}
|
||||
|
||||
/* return pointer to next token in buffer and set *buffer to one char
|
||||
@ -182,5 +177,5 @@ int dc_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
stack_machine(0);
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -62,5 +62,5 @@ extern int dutmp_main(int argc, char **argv)
|
||||
ut.ut_addr);
|
||||
}
|
||||
#endif
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ extern int mktemp_main(int argc, char **argv)
|
||||
if (argc != 2 && (argc != 3 || strcmp(argv[1], "-q")))
|
||||
usage(mktemp_usage);
|
||||
if(mkstemp(argv[argc-1]) < 0)
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
(void) puts(argv[argc-1]);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ extern int mt_main(int argc, char **argv)
|
||||
|
||||
if (code->name == 0) {
|
||||
errorMsg("unrecognized opcode %s.\n", argv[1]);
|
||||
exit (FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
op.mt_op = code->value;
|
||||
@ -87,13 +87,13 @@ extern int mt_main(int argc, char **argv)
|
||||
|
||||
if ((fd = open(file, O_RDONLY, 0)) < 0) {
|
||||
perror(file);
|
||||
exit (FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (ioctl(fd, MTIOCTOP, &op) != 0) {
|
||||
perror(file);
|
||||
exit (FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ extern int update_main(int argc, char **argv)
|
||||
|
||||
pid = fork();
|
||||
if (pid < 0)
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
else if (pid == 0) {
|
||||
/* Become a proper daemon */
|
||||
setsid();
|
||||
@ -99,12 +99,12 @@ extern int update_main(int argc, char **argv)
|
||||
syslog(LOG_INFO,
|
||||
"This kernel does not need update(8). Exiting.");
|
||||
closelog();
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
10
mkdir.c
10
mkdir.c
@ -51,7 +51,7 @@ extern int mkdir_main(int argc, char **argv)
|
||||
mode = 0;
|
||||
if (parse_mode(*(++argv), &mode) == FALSE) {
|
||||
errorMsg("Unknown mode: %s\n", *argv);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
/* Set the umask for this process so it doesn't
|
||||
* screw up whatever the user just entered. */
|
||||
@ -80,13 +80,13 @@ extern int mkdir_main(int argc, char **argv)
|
||||
|
||||
if (strlen(*argv) > BUFSIZ - 1) {
|
||||
errorMsg(name_too_long);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
strcpy(buf, *argv);
|
||||
status = stat(buf, &statBuf);
|
||||
if (parentFlag == FALSE && status != -1 && errno != ENOENT) {
|
||||
errorMsg("%s: File exists\n", buf);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (parentFlag == TRUE) {
|
||||
strcat(buf, "/");
|
||||
@ -94,11 +94,11 @@ extern int mkdir_main(int argc, char **argv)
|
||||
} else {
|
||||
if (mkdir(buf, mode) != 0 && parentFlag == FALSE) {
|
||||
perror(buf);
|
||||
exit FALSE;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
4
mkfifo.c
4
mkfifo.c
@ -55,7 +55,7 @@ extern int mkfifo_main(int argc, char **argv)
|
||||
usage(mkfifo_usage);
|
||||
if (mkfifo(*argv, mode) < 0) {
|
||||
perror("mkfifo");
|
||||
exit(255);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
2
mknod.c
2
mknod.c
@ -85,6 +85,6 @@ int mknod_main(int argc, char **argv)
|
||||
|
||||
if (mknod(argv[0], mode, dev) != 0)
|
||||
fatalError("%s: %s\n", argv[0], strerror(errno));
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
10
mkswap.c
10
mkswap.c
@ -176,7 +176,7 @@ static int bit_test_and_clear(unsigned int *addr, unsigned int nr)
|
||||
void die(const char *str)
|
||||
{
|
||||
errorMsg("%s\n", str);
|
||||
exit(FALSE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
void page_ok(int page)
|
||||
@ -325,7 +325,7 @@ int mkswap_main(int argc, char **argv)
|
||||
} else if (PAGES > sz && !force) {
|
||||
errorMsg("error: size %ld is larger than device size %d\n",
|
||||
PAGES * (pagesize / 1024), sz * (pagesize / 1024));
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (version == -1) {
|
||||
@ -369,7 +369,7 @@ int mkswap_main(int argc, char **argv)
|
||||
DEV = open(device_name, O_RDWR);
|
||||
if (DEV < 0 || fstat(DEV, &statbuf) < 0) {
|
||||
perror(device_name);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (!S_ISBLK(statbuf.st_mode))
|
||||
check = 0;
|
||||
@ -393,7 +393,7 @@ int mkswap_main(int argc, char **argv)
|
||||
"This probably means creating v0 swap would destroy your partition table\n"
|
||||
"No swap created. If you really want to create swap v0 on that device, use\n"
|
||||
"the -f option to force it.\n", device_name);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -429,5 +429,5 @@ int mkswap_main(int argc, char **argv)
|
||||
*/
|
||||
if (fsync(DEV))
|
||||
die("fsync failed");
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
4
mktemp.c
4
mktemp.c
@ -31,7 +31,7 @@ extern int mktemp_main(int argc, char **argv)
|
||||
if (argc != 2 && (argc != 3 || strcmp(argv[1], "-q")))
|
||||
usage(mktemp_usage);
|
||||
if(mkstemp(argv[argc-1]) < 0)
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
(void) puts(argv[argc-1]);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@
|
||||
#ifndef MODUTILS_MODULE_H
|
||||
#define MODUTILS_MODULE_H 1
|
||||
|
||||
#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $"
|
||||
#ident "$Id: insmod.c,v 1.29 2000/12/01 02:55:13 kraai Exp $"
|
||||
|
||||
/* This file contains the structures used by the 2.0 and 2.1 kernels.
|
||||
We do not use the kernel headers directly because we do not wish
|
||||
@ -283,7 +283,7 @@ int delete_module(const char *);
|
||||
#ifndef MODUTILS_OBJ_H
|
||||
#define MODUTILS_OBJ_H 1
|
||||
|
||||
#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $"
|
||||
#ident "$Id: insmod.c,v 1.29 2000/12/01 02:55:13 kraai Exp $"
|
||||
|
||||
/* The relocatable object is manipulated using elfin types. */
|
||||
|
||||
@ -2769,7 +2769,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
FILE *fp;
|
||||
struct obj_file *f;
|
||||
char m_name[BUFSIZ + 1] = "\0";
|
||||
int exit_status = FALSE;
|
||||
int exit_status = EXIT_FAILURE;
|
||||
int m_has_modinfo;
|
||||
#ifdef BB_FEATURE_INSMOD_VERSION_CHECKING
|
||||
int k_version;
|
||||
@ -2833,7 +2833,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
|| ((fp = fopen(m_filename, "r")) == NULL))
|
||||
{
|
||||
errorMsg("No module named '%s' found in '%s'\n", m_fullName, _PATH_MODULES);
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
} else
|
||||
fatalError("No module named '%s' found in '%s'\n", m_fullName, _PATH_MODULES);
|
||||
@ -2843,7 +2843,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
|
||||
if ((f = obj_load(fp)) == NULL) {
|
||||
perror("Could not load the module\n");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (get_modinfo_value(f, "kernel_version") == NULL)
|
||||
@ -2981,7 +2981,7 @@ extern int insmod_main( int argc, char **argv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
exit_status = TRUE;
|
||||
exit_status = EXIT_SUCCESS;
|
||||
|
||||
out:
|
||||
fclose(fp);
|
||||
|
@ -34,7 +34,7 @@ _syscall1(int, delete_module, const char *, name)
|
||||
|
||||
extern int rmmod_main(int argc, char **argv)
|
||||
{
|
||||
int ret = TRUE;
|
||||
int ret = EXIT_SUCCESS;
|
||||
if (argc <= 1) {
|
||||
usage(rmmod_usage);
|
||||
}
|
||||
@ -47,9 +47,9 @@ extern int rmmod_main(int argc, char **argv)
|
||||
/* Unload _all_ unused modules via NULL delete_module() call */
|
||||
if (delete_module(NULL)) {
|
||||
perror("rmmod");
|
||||
exit(FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
default:
|
||||
usage(rmmod_usage);
|
||||
}
|
||||
@ -59,7 +59,7 @@ extern int rmmod_main(int argc, char **argv)
|
||||
while (argc-- > 0) {
|
||||
if (delete_module(*argv) < 0) {
|
||||
perror(*argv);
|
||||
ret=FALSE;
|
||||
ret = EXIT_FAILURE;
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
|
12
mount.c
12
mount.c
@ -330,7 +330,7 @@ extern int mount_main(int argc, char **argv)
|
||||
int fakeIt = FALSE;
|
||||
int useMtab = TRUE;
|
||||
int i;
|
||||
int rc = FALSE;
|
||||
int rc = EXIT_FAILURE;
|
||||
int fstabmount = FALSE;
|
||||
|
||||
#if defined BB_FEATURE_USE_DEVPS_PATCH
|
||||
@ -367,7 +367,7 @@ extern int mount_main(int argc, char **argv)
|
||||
free( mntentlist);
|
||||
close(fd);
|
||||
#endif
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#else
|
||||
if (argc == 1) {
|
||||
@ -388,7 +388,7 @@ extern int mount_main(int argc, char **argv)
|
||||
} else {
|
||||
perror(mtab_file);
|
||||
}
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -489,7 +489,7 @@ singlemount:
|
||||
&extra_opts, &string_flags, 1);
|
||||
if ( rc != 0) {
|
||||
fatalError("nfsmount failed: %s\n", strerror(errno));
|
||||
rc = FALSE;
|
||||
rc = EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -499,7 +499,7 @@ singlemount:
|
||||
if (all == FALSE)
|
||||
break;
|
||||
|
||||
rc = TRUE; // Always return 0 for 'all'
|
||||
rc = EXIT_SUCCESS; // Always return 0 for 'all'
|
||||
}
|
||||
if (fstabmount == TRUE)
|
||||
endmntent(f);
|
||||
@ -512,8 +512,6 @@ singlemount:
|
||||
|
||||
goto singlemount;
|
||||
|
||||
exit(FALSE);
|
||||
|
||||
goodbye:
|
||||
usage(mount_usage);
|
||||
}
|
||||
|
8
mt.c
8
mt.c
@ -76,7 +76,7 @@ extern int mt_main(int argc, char **argv)
|
||||
|
||||
if (code->name == 0) {
|
||||
errorMsg("unrecognized opcode %s.\n", argv[1]);
|
||||
exit (FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
op.mt_op = code->value;
|
||||
@ -87,13 +87,13 @@ extern int mt_main(int argc, char **argv)
|
||||
|
||||
if ((fd = open(file, O_RDONLY, 0)) < 0) {
|
||||
perror(file);
|
||||
exit (FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (ioctl(fd, MTIOCTOP, &op) != 0) {
|
||||
perror(file);
|
||||
exit (FALSE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return (TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ int nslookup_main(int argc, char **argv)
|
||||
host = gethostbyname(argv[1]);
|
||||
}
|
||||
hostent_fprint(host, stdout);
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* $Id: nslookup.c,v 1.12 2000/09/25 21:45:58 andersen Exp $ */
|
||||
/* $Id: nslookup.c,v 1.13 2000/12/01 02:55:13 kraai Exp $ */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* $Id: ping.c,v 1.26 2000/11/14 23:29:24 andersen Exp $
|
||||
* $Id: ping.c,v 1.27 2000/12/01 02:55:13 kraai Exp $
|
||||
* Mini ping implementation for busybox
|
||||
*
|
||||
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
|
||||
@ -256,7 +256,7 @@ extern int ping_main(int argc, char **argv)
|
||||
if (argc < 1)
|
||||
usage(ping_usage);
|
||||
ping(*argv);
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#else /* ! BB_FEATURE_SIMPLE_PING */
|
||||
@ -546,7 +546,7 @@ extern int ping_main(int argc, char **argv)
|
||||
|
||||
myid = getpid() & 0xFFFF;
|
||||
ping(*argv);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif /* ! BB_FEATURE_SIMPLE_PING */
|
||||
|
||||
|
@ -167,7 +167,7 @@ int nslookup_main(int argc, char **argv)
|
||||
host = gethostbyname(argv[1]);
|
||||
}
|
||||
hostent_fprint(host, stdout);
|
||||
return( TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* $Id: nslookup.c,v 1.12 2000/09/25 21:45:58 andersen Exp $ */
|
||||
/* $Id: nslookup.c,v 1.13 2000/12/01 02:55:13 kraai Exp $ */
|
||||
|
6
ping.c
6
ping.c
@ -1,6 +1,6 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* $Id: ping.c,v 1.26 2000/11/14 23:29:24 andersen Exp $
|
||||
* $Id: ping.c,v 1.27 2000/12/01 02:55:13 kraai Exp $
|
||||
* Mini ping implementation for busybox
|
||||
*
|
||||
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
|
||||
@ -256,7 +256,7 @@ extern int ping_main(int argc, char **argv)
|
||||
if (argc < 1)
|
||||
usage(ping_usage);
|
||||
ping(*argv);
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#else /* ! BB_FEATURE_SIMPLE_PING */
|
||||
@ -546,7 +546,7 @@ extern int ping_main(int argc, char **argv)
|
||||
|
||||
myid = getpid() & 0xFFFF;
|
||||
ping(*argv);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif /* ! BB_FEATURE_SIMPLE_PING */
|
||||
|
||||
|
@ -60,7 +60,7 @@ extern int free_main(int argc, char **argv)
|
||||
printf("%6s%13ld%13ld%13ld\n", "Total:", info.totalram+info.totalswap,
|
||||
(info.totalram-info.freeram)+(info.totalswap-info.freeswap),
|
||||
info.freeram+info.freeswap);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ extern int kill_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "\n\n");
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
break;
|
||||
case '-':
|
||||
@ -236,11 +236,12 @@ extern int kill_main(int argc, char **argv)
|
||||
* upon exit, so we can save a byte or two */
|
||||
argv++;
|
||||
}
|
||||
exit (all_found);
|
||||
if (all_found == FALSE)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
exit(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
|
||||
end:
|
||||
|
@ -183,7 +183,7 @@ extern int ps_main(int argc, char **argv)
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
closedir(dir);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,5 +70,5 @@ extern int uptime_main(int argc, char **argv)
|
||||
LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]),
|
||||
LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2]));
|
||||
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
2
ps.c
2
ps.c
@ -183,7 +183,7 @@ extern int ps_main(int argc, char **argv)
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
closedir(dir);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
2
pwd.c
2
pwd.c
@ -34,5 +34,5 @@ extern int pwd_main(int argc, char **argv)
|
||||
fatalError("%s\n", strerror(errno));
|
||||
|
||||
printf("%s\n", buf);
|
||||
return(TRUE);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user