diff options
author | Matt Kraai | 2000-12-01 02:55:13 +0000 |
---|---|---|
committer | Matt Kraai | 2000-12-01 02:55:13 +0000 |
commit | 3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0 (patch) | |
tree | 013a1e7752113314831ad7d51854ce8dc9e0918b /tar.c | |
parent | b558e76eb1ba173ce3501c3e13fb80f426a7faac (diff) | |
download | busybox-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.zip busybox-3e856ce428cabaf6c8d99a2374a1f9a4a05db5f0.tar.gz |
Stop using TRUE and FALSE for exit status.
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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"); } |