summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-03-14 23:09:02 +0000
committerkientzle <kientzle@FreeBSD.org>2008-03-14 23:09:02 +0000
commit794d55fb646e76a8a8b08772271e57658e865df4 (patch)
tree5cf5b9f9ad382c5a6560e18ac4d3de628401831d /lib
parentf9f0592c21ed6360f9ab668e645729680e2378fe (diff)
downloadFreeBSD-src-794d55fb646e76a8a8b08772271e57658e865df4.zip
FreeBSD-src-794d55fb646e76a8a8b08772271e57658e865df4.tar.gz
Don't advertise the default block size as a constant; don't
rely on a deprecated value to set the default. This is also related to a longer-term goal of setting the default block size based on format and possibly other factors, which makes it a bad idea to tie this to a published constant.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_write.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libarchive/archive_write.c b/lib/libarchive/archive_write.c
index c9d40b0..ea09763 100644
--- a/lib/libarchive/archive_write.c
+++ b/lib/libarchive/archive_write.c
@@ -97,7 +97,12 @@ archive_write_new(void)
a->archive.magic = ARCHIVE_WRITE_MAGIC;
a->archive.state = ARCHIVE_STATE_NEW;
a->archive.vtable = archive_write_vtable();
- a->bytes_per_block = ARCHIVE_DEFAULT_BYTES_PER_BLOCK;
+ /*
+ * The value 10240 here matches the traditional tar default,
+ * but is otherwise arbitrary.
+ * TODO: Set the default block size from the format selected.
+ */
+ a->bytes_per_block = 10240;
a->bytes_in_last_block = -1; /* Default */
/* Initialize a block of nulls for padding purposes. */
OpenPOWER on IntegriCloud