summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath2002-11-13 00:24:20 +0000
committerGlenn L McGrath2002-11-13 00:24:20 +0000
commite356883ffb0c7300aa0312864ddf203a6d322d94 (patch)
treee5ef4635958a251b3a751437841471ba85c44665 /archival/tar.c
parent034c371bb2ea7d66caf3ac29178ce941837edb9f (diff)
downloadbusybox-e356883ffb0c7300aa0312864ddf203a6d322d94.zip
busybox-e356883ffb0c7300aa0312864ddf203a6d322d94.tar.gz
Minor cleanups
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 01ec90c..f9711f8 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -685,7 +685,7 @@ int tar_main(int argc, char **argv)
#endif
#ifdef CONFIG_FEATURE_TAR_BZIP2
case 'j':
- tar_handle->read = read_bz2;
+ get_header_ptr = get_header_tar_bz2;
break;
#endif
default:
@@ -738,21 +738,9 @@ int tar_main(int argc, char **argv)
tar_handle->src_fd = fileno(stdin);
tar_handle->seek = seek_by_char;
} else {
- tar_handle->seek = seek_by_jump;
tar_handle->src_fd = xopen(tar_filename, O_RDONLY);
}
-#ifdef CONFIG_FEATURE_TAR_GZIP
- if (get_header_ptr == get_header_tar_gz) {
- get_header_tar_gz(tar_handle);
- } else
-#endif /* CONFIG_FEATURE_TAR_GZIP */
-#ifdef CONFIG_FEATURE_TAR_BZIP2
- if (tar_handle->read == read_bz2) {
- get_header_tar_bz2(tar_handle);
- } else
-#endif /* CONFIG_FEATURE_TAR_BZIP2 */
-
- while (get_header_tar(tar_handle) == EXIT_SUCCESS);
+ while (get_header_ptr(tar_handle) == EXIT_SUCCESS);
/* Ckeck that every file that should have been extracted was */
while (tar_handle->accept) {