summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_write.3
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2004-04-05 21:12:29 +0000
committerkientzle <kientzle@FreeBSD.org>2004-04-05 21:12:29 +0000
commit775d07093eb7dc5701457147a8404f0eae443538 (patch)
tree65c99eaf5f048beaa6a7d9973eb8410048b1f15d /lib/libarchive/archive_write.3
parent74cf37bd00b1e09a0b991b7b1edd335d8e0c2355 (diff)
downloadFreeBSD-src-775d07093eb7dc5701457147a8404f0eae443538.zip
FreeBSD-src-775d07093eb7dc5701457147a8404f0eae443538.tar.gz
Overhauled ACL support. This makes us compatible
with 'star' ACL handling, though there's still a bit more work needed in this area. Added 'write_open_fd' and 'read_open_fd' to simplify, e.g., tar's u and r modes. Eliminated old 'write_open_file_position' as a bad idea. (It required closing/reopening files to do updates, which led to unpleasant implications.) Various other minor fixes, API tweaks, etc.
Diffstat (limited to 'lib/libarchive/archive_write.3')
-rw-r--r--lib/libarchive/archive_write.326
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/libarchive/archive_write.3 b/lib/libarchive/archive_write.3
index 2cebaab..a4a135f 100644
--- a/lib/libarchive/archive_write.3
+++ b/lib/libarchive/archive_write.3
@@ -40,8 +40,8 @@
.Nm archive_write_set_compressor_gzip ,
.Nm archive_write_set_compressor_bzip2 ,
.Nm archive_write_open ,
+.Nm archive_write_open_fd ,
.Nm archive_write_open_file ,
-.Nm archive_write_open_tar ,
.Nm archive_write_prepare ,
.Nm archive_write_header ,
.Nm archive_write_data ,
@@ -74,9 +74,9 @@
.Ft int
.Fn archive_write_open "struct archive *" "void *client_data" "archive_write_archive_callback *" "archive_open_archive_callback *" "archive_close_archive_callback *"
.Ft int
-.Fn archive_write_open_file "struct archive *" "const char *filename"
+.Fn archive_write_open_fd "struct archive *" "int fd"
.Ft int
-.Fn archive_write_open_tar "struct archive *" "const char *archive_name"
+.Fn archive_write_open_file "struct archive *" "const char *filename"
.Ft int
.Fn archive_write_header "struct archive *"
.Ft int
@@ -117,7 +117,7 @@ is applied only after the compression.
The uncompressed data is always unpadded.
The default is to pad the last block to the full block size (note that
.Fn archive_write_open_file
-affects this).
+will set this based on the file type).
Unlike the other
.Dq set
functions, this function can be called after the archive is opened.
@@ -153,6 +153,16 @@ Freeze the settings, open the archive, and prepare for writing entries.
This is the most generic form of this function, which accepts
pointers to three callback functions which will be invoked by
the library to write the constructed archive.
+Note: Internally, the callbacks are invoked by the compression layer.
+In order to support external compression programs, the compression
+is permitted to fork and invoke the callbacks from a separate process.
+In particular, clients should not assume that they can communicate
+between the callbacks and the mainline code using shared variables.
+Note that the standard gzip, bzip2, and "none" compression methods do not fork.
+.It Fn archive_write_open_fd
+A convenience form of
+.Fn archive_write_open
+that accepts a file descriptor.
.It Fn archive_write_open_file
A convenience form of
.Fn archive_write_open
@@ -172,14 +182,6 @@ You can override this by manually invoking
.Fn archive_write_set_bytes_in_last_block
either before or after calling
.Fn archive_write_open .
-.It Fn archive_write_open_tar
-A convenience form of
-.Fn archive_write_open
-that accepts an archive name in the same formats accepted by
-.Xr tar 1 .
-In particular, a
-.Pa -
-argument indicates that the output should be written to standard output.
.It Fn archive_write_header
Build and write a header using the data in the provided
.Tn struct archive_entry
OpenPOWER on IntegriCloud