diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-13 00:24:20 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-11-13 00:24:20 +0000 |
commit | e356883ffb0c7300aa0312864ddf203a6d322d94 (patch) | |
tree | e5ef4635958a251b3a751437841471ba85c44665 /archival/tar.c | |
parent | 034c371bb2ea7d66caf3ac29178ce941837edb9f (diff) | |
download | busybox-w32-e356883ffb0c7300aa0312864ddf203a6d322d94.tar.gz busybox-w32-e356883ffb0c7300aa0312864ddf203a6d322d94.tar.bz2 busybox-w32-e356883ffb0c7300aa0312864ddf203a6d322d94.zip |
Minor cleanups
Diffstat (limited to 'archival/tar.c')
-rw-r--r-- | archival/tar.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/archival/tar.c b/archival/tar.c index 01ec90c6f..f9711f8df 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -685,7 +685,7 @@ int tar_main(int argc, char **argv) | |||
685 | #endif | 685 | #endif |
686 | #ifdef CONFIG_FEATURE_TAR_BZIP2 | 686 | #ifdef CONFIG_FEATURE_TAR_BZIP2 |
687 | case 'j': | 687 | case 'j': |
688 | tar_handle->read = read_bz2; | 688 | get_header_ptr = get_header_tar_bz2; |
689 | break; | 689 | break; |
690 | #endif | 690 | #endif |
691 | default: | 691 | default: |
@@ -738,21 +738,9 @@ int tar_main(int argc, char **argv) | |||
738 | tar_handle->src_fd = fileno(stdin); | 738 | tar_handle->src_fd = fileno(stdin); |
739 | tar_handle->seek = seek_by_char; | 739 | tar_handle->seek = seek_by_char; |
740 | } else { | 740 | } else { |
741 | tar_handle->seek = seek_by_jump; | ||
742 | tar_handle->src_fd = xopen(tar_filename, O_RDONLY); | 741 | tar_handle->src_fd = xopen(tar_filename, O_RDONLY); |
743 | } | 742 | } |
744 | #ifdef CONFIG_FEATURE_TAR_GZIP | 743 | while (get_header_ptr(tar_handle) == EXIT_SUCCESS); |
745 | if (get_header_ptr == get_header_tar_gz) { | ||
746 | get_header_tar_gz(tar_handle); | ||
747 | } else | ||
748 | #endif /* CONFIG_FEATURE_TAR_GZIP */ | ||
749 | #ifdef CONFIG_FEATURE_TAR_BZIP2 | ||
750 | if (tar_handle->read == read_bz2) { | ||
751 | get_header_tar_bz2(tar_handle); | ||
752 | } else | ||
753 | #endif /* CONFIG_FEATURE_TAR_BZIP2 */ | ||
754 | |||
755 | while (get_header_tar(tar_handle) == EXIT_SUCCESS); | ||
756 | 744 | ||
757 | /* Ckeck that every file that should have been extracted was */ | 745 | /* Ckeck that every file that should have been extracted was */ |
758 | while (tar_handle->accept) { | 746 | while (tar_handle->accept) { |