diff options
Diffstat (limited to 'archival/tar.c')
-rw-r--r-- | archival/tar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/tar.c b/archival/tar.c index a4b13b5de..ab4d1f266 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -91,7 +91,7 @@ struct HardLinkInfo { | |||
91 | struct TarBallInfo { | 91 | struct TarBallInfo { |
92 | char *fileName; /* File name of the tarball */ | 92 | char *fileName; /* File name of the tarball */ |
93 | int tarFd; /* Open-for-write file descriptor | 93 | int tarFd; /* Open-for-write file descriptor |
94 | for the tarball */ | 94 | for the tarball */ |
95 | struct stat statBuf; /* Stat info for the tarball, letting | 95 | struct stat statBuf; /* Stat info for the tarball, letting |
96 | us know the inode and device that the | 96 | us know the inode and device that the |
97 | tarball lives, so we can avoid trying | 97 | tarball lives, so we can avoid trying |
@@ -569,7 +569,7 @@ static char get_header_tar_Z(archive_handle_t *archive_handle) | |||
569 | 569 | ||
570 | /* do the decompression, and cleanup */ | 570 | /* do the decompression, and cleanup */ |
571 | if (bb_xread_char(archive_handle->src_fd) != 0x1f || | 571 | if (bb_xread_char(archive_handle->src_fd) != 0x1f || |
572 | bb_xread_char(archive_handle->src_fd) != 0x9d) | 572 | bb_xread_char(archive_handle->src_fd) != 0x9d) |
573 | { | 573 | { |
574 | bb_error_msg_and_die("Invalid magic"); | 574 | bb_error_msg_and_die("Invalid magic"); |
575 | } | 575 | } |
@@ -699,7 +699,7 @@ static const struct option tar_long_options[] = { | |||
699 | # ifdef CONFIG_FEATURE_TAR_COMPRESS | 699 | # ifdef CONFIG_FEATURE_TAR_COMPRESS |
700 | { "compress", 0, NULL, 'Z' }, | 700 | { "compress", 0, NULL, 'Z' }, |
701 | # endif | 701 | # endif |
702 | { 0, 0, 0, 0 } | 702 | { 0, 0, 0, 0 } |
703 | }; | 703 | }; |
704 | #else | 704 | #else |
705 | #define tar_long_options 0 | 705 | #define tar_long_options 0 |
@@ -713,7 +713,7 @@ int tar_main(int argc, char **argv) | |||
713 | const char *tar_filename = "-"; | 713 | const char *tar_filename = "-"; |
714 | unsigned long opt; | 714 | unsigned long opt; |
715 | llist_t *excludes = NULL; | 715 | llist_t *excludes = NULL; |
716 | 716 | ||
717 | /* Initialise default values */ | 717 | /* Initialise default values */ |
718 | tar_handle = init_handle(); | 718 | tar_handle = init_handle(); |
719 | tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL; | 719 | tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS | ARCHIVE_PRESERVE_DATE | ARCHIVE_EXTRACT_UNCONDITIONAL; |
@@ -743,7 +743,7 @@ int tar_main(int argc, char **argv) | |||
743 | } | 743 | } |
744 | if((opt & CTX_EXTRACT) && tar_handle->action_data != data_extract_to_stdout) | 744 | if((opt & CTX_EXTRACT) && tar_handle->action_data != data_extract_to_stdout) |
745 | tar_handle->action_data = data_extract_all; | 745 | tar_handle->action_data = data_extract_all; |
746 | 746 | ||
747 | if (opt & TAR_OPT_2STDOUT) | 747 | if (opt & TAR_OPT_2STDOUT) |
748 | tar_handle->action_data = data_extract_to_stdout; | 748 | tar_handle->action_data = data_extract_to_stdout; |
749 | 749 | ||
@@ -843,9 +843,9 @@ int tar_main(int argc, char **argv) | |||
843 | int zipMode = 0; | 843 | int zipMode = 0; |
844 | 844 | ||
845 | if (ENABLE_FEATURE_TAR_GZIP && get_header_ptr == get_header_tar_gz) | 845 | if (ENABLE_FEATURE_TAR_GZIP && get_header_ptr == get_header_tar_gz) |
846 | zipMode = 1; | 846 | zipMode = 1; |
847 | if (ENABLE_FEATURE_TAR_BZIP2 && get_header_ptr == get_header_tar_bz2) | 847 | if (ENABLE_FEATURE_TAR_BZIP2 && get_header_ptr == get_header_tar_bz2) |
848 | zipMode = 2; | 848 | zipMode = 2; |
849 | 849 | ||
850 | if ((tar_handle->action_header == header_list) || | 850 | if ((tar_handle->action_header == header_list) || |
851 | (tar_handle->action_header == header_verbose_list)) | 851 | (tar_handle->action_header == header_verbose_list)) |