mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Use the return value from uncompress_bunzip, fix some typo
This commit is contained in:
parent
1c834407e3
commit
f235d05773
@ -83,16 +83,13 @@ int bunzip2_main(int argc, char **argv)
|
|||||||
dst_fd = bb_xopen(save_name, O_WRONLY | O_CREAT);
|
dst_fd = bb_xopen(save_name, O_WRONLY | O_CREAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uncompressStream(src_fd, dst_fd) == 0) {
|
status = uncompressStream(src_fd, dst_fd);
|
||||||
if (!(flags & bunzip_to_stdout)) {
|
if(!(flags & bunzip_to_stdout)) {
|
||||||
|
if (status) {
|
||||||
|
delete_name = save_name;
|
||||||
|
} else {
|
||||||
delete_name = argv[optind];
|
delete_name = argv[optind];
|
||||||
}
|
}
|
||||||
status = EXIT_SUCCESS;
|
|
||||||
} else {
|
|
||||||
if (!(flags & bunzip_to_stdout)) {
|
|
||||||
delete_name = save_name;
|
|
||||||
}
|
|
||||||
status = EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((delete_name) && (unlink(delete_name) < 0)) {
|
if ((delete_name) && (unlink(delete_name) < 0)) {
|
||||||
|
@ -35,7 +35,7 @@ typedef struct archive_handle_s {
|
|||||||
/* process the header component, e.g. tar -t */
|
/* process the header component, e.g. tar -t */
|
||||||
void (*action_header)(const file_header_t *);
|
void (*action_header)(const file_header_t *);
|
||||||
|
|
||||||
/* process the data componenet, e.g. extract to filesystem */
|
/* process the data component, e.g. extract to filesystem */
|
||||||
void (*action_data)(struct archive_handle_s *);
|
void (*action_data)(struct archive_handle_s *);
|
||||||
|
|
||||||
/* How to process any sub archive, e.g. get_header_tar_gz */
|
/* How to process any sub archive, e.g. get_header_tar_gz */
|
||||||
@ -56,7 +56,7 @@ typedef struct archive_handle_s {
|
|||||||
/* Function that skips data: read_by_char or read_by_skip */
|
/* Function that skips data: read_by_char or read_by_skip */
|
||||||
void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount);
|
void (*seek)(const struct archive_handle_s *archive_handle, const unsigned int amount);
|
||||||
|
|
||||||
/* Temperary storage */
|
/* Temporary storage */
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
|
||||||
/* Misc. stuff */
|
/* Misc. stuff */
|
||||||
|
Loading…
Reference in New Issue
Block a user