aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-10-29 03:37:54 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-10-29 03:37:54 +0000
commitf235d057735a0871cd9b096bbb0ede6d42643f79 (patch)
treef709d900e417eb7b6ceef03dcff6d897a73b5714
parent1c834407e39197d9d3f127d4783b75af5e793319 (diff)
downloadbusybox-w32-f235d057735a0871cd9b096bbb0ede6d42643f79.tar.gz
busybox-w32-f235d057735a0871cd9b096bbb0ede6d42643f79.tar.bz2
busybox-w32-f235d057735a0871cd9b096bbb0ede6d42643f79.zip
Use the return value from uncompress_bunzip, fix some typo
-rw-r--r--archival/bunzip2.c13
-rw-r--r--include/unarchive.h4
2 files changed, 7 insertions, 10 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index 4f231c959..191dda035 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -83,16 +83,13 @@ int bunzip2_main(int argc, char **argv)
83 dst_fd = bb_xopen(save_name, O_WRONLY | O_CREAT); 83 dst_fd = bb_xopen(save_name, O_WRONLY | O_CREAT);
84 } 84 }
85 85
86 if (uncompressStream(src_fd, dst_fd) == 0) { 86 status = uncompressStream(src_fd, dst_fd);
87 if (!(flags & bunzip_to_stdout)) { 87 if(!(flags & bunzip_to_stdout)) {
88 delete_name = argv[optind]; 88 if (status) {
89 }
90 status = EXIT_SUCCESS;
91 } else {
92 if (!(flags & bunzip_to_stdout)) {
93 delete_name = save_name; 89 delete_name = save_name;
90 } else {
91 delete_name = argv[optind];
94 } 92 }
95 status = EXIT_FAILURE;
96 } 93 }
97 94
98 if ((delete_name) && (unlink(delete_name) < 0)) { 95 if ((delete_name) && (unlink(delete_name) < 0)) {
diff --git a/include/unarchive.h b/include/unarchive.h
index 1c4e851ab..9f1331338 100644
--- a/include/unarchive.h
+++ b/include/unarchive.h
@@ -35,7 +35,7 @@ typedef struct archive_handle_s {
35 /* process the header component, e.g. tar -t */ 35 /* process the header component, e.g. tar -t */
36 void (*action_header)(const file_header_t *); 36 void (*action_header)(const file_header_t *);
37 37
38 /* process the data componenet, e.g. extract to filesystem */ 38 /* process the data component, e.g. extract to filesystem */
39 void (*action_data)(struct archive_handle_s *); 39 void (*action_data)(struct archive_handle_s *);
40 40
41 /* How to process any sub archive, e.g. get_header_tar_gz */ 41 /* How to process any sub archive, e.g. get_header_tar_gz */
@@ -56,7 +56,7 @@ typedef struct archive_handle_s {
56 /* Function that skips data: read_by_char or read_by_skip */ 56 /* Function that skips data: read_by_char or read_by_skip */
57 void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount); 57 void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount);
58 58
59 /* Temperary storage */ 59 /* Temporary storage */
60 char *buffer; 60 char *buffer;
61 61
62 /* Misc. stuff */ 62 /* Misc. stuff */