diff options
author | cperciva <cperciva@FreeBSD.org> | 2007-03-31 22:59:43 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2007-03-31 22:59:43 +0000 |
commit | 5ca8f701f1424bb5e1b4504e01a71f01252654f1 (patch) | |
tree | 1361de2a0496b3c2146c0eb0ea65d53aa30e8982 /lib/libarchive/archive_read_support_format_tar.c | |
parent | 7af0b4e5ce104914d5971547b0fea1984ef4d6c4 (diff) | |
download | FreeBSD-src-5ca8f701f1424bb5e1b4504e01a71f01252654f1.zip FreeBSD-src-5ca8f701f1424bb5e1b4504e01a71f01252654f1.tar.gz |
Provide a dummy compression-layer skip function which just reads data and
discards it, for use when the compression layer code doesn't know how to
skip data (e.g., everything other than the "none" compressor). This makes
format level code simpler because that code can now assume that the
compression layer always knows how to skip and will always skip exactly
the requested number of bytes.
Discussed with: kientzle (3 months ago)
Diffstat (limited to 'lib/libarchive/archive_read_support_format_tar.c')
-rw-r--r-- | lib/libarchive/archive_read_support_format_tar.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/libarchive/archive_read_support_format_tar.c b/lib/libarchive/archive_read_support_format_tar.c index 8aa5a38..3c24733 100644 --- a/lib/libarchive/archive_read_support_format_tar.c +++ b/lib/libarchive/archive_read_support_format_tar.c @@ -546,18 +546,8 @@ archive_read_format_tar_skip(struct archive_read *a) off_t bytes_skipped; struct tar* tar; struct sparse_block *p; - int r = ARCHIVE_OK; - const void *b; /* dummy variables */ - size_t s; - off_t o; - tar = (struct tar *)*(a->pformat_data); - if (a->compression_skip == NULL) { - while (r == ARCHIVE_OK) - r = archive_read_format_tar_read_data(a, &b, &s, &o); - return (r); - } /* * Compression layer skip functions are required to either skip the |