summaryrefslogtreecommitdiffhomepage
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 17:54:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 17:54:47 +0000
commit7039a66b58706457c7423de60556e04545432943 (patch)
treea512daebc3674c819766664c8ea17d41ef7fef02 /archival
parent1385899416a4396385ad421ae1f532be7103738a (diff)
correct largefile support, add comments about it.
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c2
-rw-r--r--archival/unzip.c5
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,
/* If it was a regular file, write out the body */
if (inputFileFd >= 0) {
- ssize_t readSize = 0;
+ off_t readSize = 0;
/* write the file to the archive */
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 {
} formatted ATTRIBUTE_PACKED;
} zip_header_t;
-/* This one never works with LARGEFILE-sized skips */
static void unzip_skip(int fd, off_t skip)
{
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)
{
if (zip_header->formatted.method == 0) {
/* Method 0 - stored (not compressed) */
- int size = zip_header->formatted.ucmpsize;
+ off_t size = zip_header->formatted.ucmpsize;
if (size && (bb_copyfd_size(src_fd, dst_fd, size) != size)) {
bb_error_msg_and_die("cannot complete extraction");
}
@@ -202,7 +201,7 @@ int unzip_main(int argc, char **argv)
}
if (src_fd == -1) {
src_fn[orig_src_fn_len] = 0;
- bb_error_msg_and_die("Cannot open %s, %s.zip, %s.ZIP", src_fn, src_fn, src_fn);
+ bb_error_msg_and_die("cannot open %s, %s.zip, %s.ZIP", src_fn, src_fn, src_fn);
}
}