diff options
author | kientzle <kientzle@FreeBSD.org> | 2006-11-26 19:00:50 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2006-11-26 19:00:50 +0000 |
commit | 0f8fa3629e664a8cdfd6022cc1840102e3ff8c2c (patch) | |
tree | ebb3f03dd6640df049cc9396f4d753c10aa6ccc4 /lib/libarchive/archive.h.in | |
parent | 24b0d3f0fdb86f7a4f9ecc9d9a8d01046094ed63 (diff) | |
download | FreeBSD-src-0f8fa3629e664a8cdfd6022cc1840102e3ff8c2c.zip FreeBSD-src-0f8fa3629e664a8cdfd6022cc1840102e3ff8c2c.tar.gz |
Write-blocking cleanup, largely thanks to Colin Percival (cperciva@).
* If write block size is zero, don't block at all.
This supports the unusual requirement of applications
that need "no-delay" writes.
* Expose _write_finish_entry() to give such applications more
control over write boundaries. (Normal applications do not
need this, as entries are completed automatically.)
* Correct the type of write callbacks; this is a minor API
change that does not affect the ABI.
* Correct the error handling in _write_next_header() around
completing the previous entry.
* Correct the documentation for block-size markers: Remove
docs for the long-defunct _read_set_block_size(); document
all of the write block size manipulators.
MFC after: 14 days
Diffstat (limited to 'lib/libarchive/archive.h.in')
-rw-r--r-- | lib/libarchive/archive.h.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libarchive/archive.h.in b/lib/libarchive/archive.h.in index 4567de7..e0fe3e0 100644 --- a/lib/libarchive/archive.h.in +++ b/lib/libarchive/archive.h.in @@ -116,7 +116,7 @@ typedef ssize_t archive_skip_callback(struct archive *, void *_client_data, size_t request); /* Returns size actually written, zero on EOF, -1 on error. */ typedef ssize_t archive_write_callback(struct archive *, void *_client_data, - void *_buffer, size_t _length); + const void *_buffer, size_t _length); typedef int archive_open_callback(struct archive *, void *_client_data); typedef int archive_close_callback(struct archive *, void *_client_data); @@ -358,6 +358,7 @@ int archive_write_header(struct archive *, struct archive_entry *); /* TODO: should be ssize_t, but that might require .so version bump? */ int archive_write_data(struct archive *, const void *, size_t); +int archive_write_finish_entry(struct archive *); int archive_write_close(struct archive *); void archive_write_finish(struct archive *); |