From 6c8f54e991eff9d4c8499e15d8cf738a19c47274 Mon Sep 17 00:00:00 2001 From: Tim Kientzle <kientzle@FreeBSD.org> Date: Fri, 14 Mar 2008 23:09:02 +0000 Subject: [PATCH] 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. --- lib/libarchive/archive_write.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libarchive/archive_write.c b/lib/libarchive/archive_write.c index c9d40b0a8ac1..ea0976365963 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. */