diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/tar.c | 2 | ||||
-rw-r--r-- | archival/unzip.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/archival/tar.c b/archival/tar.c index b2ae3b2af..28bb14776 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -376,7 +376,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, | |||
376 | 376 | ||
377 | /* If it was a regular file, write out the body */ | 377 | /* If it was a regular file, write out the body */ |
378 | if (inputFileFd >= 0) { | 378 | if (inputFileFd >= 0) { |
379 | ssize_t readSize = 0; | 379 | off_t readSize = 0; |
380 | 380 | ||
381 | /* write the file to the archive */ | 381 | /* write the file to the archive */ |
382 | readSize = bb_copyfd_eof(inputFileFd, tbInfo->tarFd); | 382 | readSize = bb_copyfd_eof(inputFileFd, tbInfo->tarFd); |
diff --git a/archival/unzip.c b/archival/unzip.c index f70baebf9..2aa380dc8 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -51,7 +51,6 @@ typedef union { | |||
51 | } formatted ATTRIBUTE_PACKED; | 51 | } formatted ATTRIBUTE_PACKED; |
52 | } zip_header_t; | 52 | } zip_header_t; |
53 | 53 | ||
54 | /* This one never works with LARGEFILE-sized skips */ | ||
55 | static void unzip_skip(int fd, off_t skip) | 54 | static void unzip_skip(int fd, off_t skip) |
56 | { | 55 | { |
57 | if (lseek(fd, skip, SEEK_CUR) == (off_t)-1) { | 56 | if (lseek(fd, skip, SEEK_CUR) == (off_t)-1) { |
@@ -75,7 +74,7 @@ static int unzip_extract(zip_header_t *zip_header, int src_fd, int dst_fd) | |||
75 | { | 74 | { |
76 | if (zip_header->formatted.method == 0) { | 75 | if (zip_header->formatted.method == 0) { |
77 | /* Method 0 - stored (not compressed) */ | 76 | /* Method 0 - stored (not compressed) */ |
78 | int size = zip_header->formatted.ucmpsize; | 77 | off_t size = zip_header->formatted.ucmpsize; |
79 | if (size && (bb_copyfd_size(src_fd, dst_fd, size) != size)) { | 78 | if (size && (bb_copyfd_size(src_fd, dst_fd, size) != size)) { |
80 | bb_error_msg_and_die("cannot complete extraction"); | 79 | bb_error_msg_and_die("cannot complete extraction"); |
81 | } | 80 | } |
@@ -202,7 +201,7 @@ int unzip_main(int argc, char **argv) | |||
202 | } | 201 | } |
203 | if (src_fd == -1) { | 202 | if (src_fd == -1) { |
204 | src_fn[orig_src_fn_len] = 0; | 203 | src_fn[orig_src_fn_len] = 0; |
205 | bb_error_msg_and_die("Cannot open %s, %s.zip, %s.ZIP", src_fn, src_fn, src_fn); | 204 | bb_error_msg_and_die("cannot open %s, %s.zip, %s.ZIP", src_fn, src_fn, src_fn); |
206 | } | 205 | } |
207 | } | 206 | } |
208 | 207 | ||