diff options
author | Tim Kientzle <kientzle@FreeBSD.org> | 2008-03-14 23:09:02 +0000 |
---|---|---|
committer | Tim Kientzle <kientzle@FreeBSD.org> | 2008-03-14 23:09:02 +0000 |
commit | 6c8f54e991eff9d4c8499e15d8cf738a19c47274 (patch) | |
tree | 5cf5b9f9ad382c5a6560e18ac4d3de628401831d /lib/libarchive | |
parent | 8e4bc81237dda4654b1d60639d6cea9045cbb8e3 (diff) | |
download | src-6c8f54e991eff9d4c8499e15d8cf738a19c47274.tar.gz src-6c8f54e991eff9d4c8499e15d8cf738a19c47274.zip |
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.
Notes
Notes:
svn path=/head/; revision=177192
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/archive_write.c | 7 |
1 files changed, 6 insertions, 1 deletions
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. */ |