1 .\" Copyright (c) 2011 Tim Kientzle
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .Dt ARCHIVE_READ_OPTIONS 3
31 .Nm archive_read_set_filter_option ,
32 .Nm archive_read_set_format_option ,
33 .Nm archive_read_set_option ,
34 .Nm archive_read_set_options
35 .Nd functions controlling options for reading archives
38 Streaming Archive Library (libarchive, -larchive)
42 .Fo archive_read_set_filter_option
43 .Fa "struct archive *"
44 .Fa "const char *module"
45 .Fa "const char *option"
46 .Fa "const char *value"
49 .Fo archive_read_set_format_option
50 .Fa "struct archive *"
51 .Fa "const char *module"
52 .Fa "const char *option"
53 .Fa "const char *value"
56 .Fo archive_read_set_option
57 .Fa "struct archive *"
58 .Fa "const char *module"
59 .Fa "const char *option"
60 .Fa "const char *value"
63 .Fo archive_read_set_options
64 .Fa "struct archive *"
65 .Fa "const char *options"
68 These functions provide a way for libarchive clients to configure
69 specific read modules.
70 .Bl -tag -width indent
72 .Fn archive_read_set_filter_option ,
73 .Fn archive_read_set_format_option
75 Specifies an option that will be passed to currently-registered
76 filters (including decompression filters) or format readers.
84 these functions will do nothing and
93 is not, these functions will do nothing and
104 will be provided to the filter or reader named
106 The return value will be that of the module.
107 If there is no such module,
118 will be provided to every registered module.
119 If any module returns
121 this value will be returned immediately.
124 will be returned if any module accepts the option, and
129 .Fn archive_read_set_option
132 .Fn archive_read_set_format_option ,
134 .Fn archive_read_set_filter_option .
135 If either function returns
140 Otherwise, greater of the two values will be returned.
143 .Fn archive_read_set_options
146 is a comma-separated list of options.
153 will be returned immediately.
156 .Fn archive_read_set_option
157 with each option in turn.
159 .Fn archive_read_set_option
163 will be returned immediately.
165 Individual options have one of the following forms:
166 .Bl -tag -compact -width indent
168 The option/value pair will be provided to every module.
169 Modules that do not accept an option with this name will ignore it.
171 The option will be provided to every module with a value of
174 The option will be provided to every module with a NULL value.
175 .It Ar module:option=value , Ar module:option , Ar module:!option
176 As above, but the corresponding option and value will be provided
177 only to modules whose name matches
183 .Bl -tag -compact -width indent
185 .Bl -tag -compact -width indent
187 The value is used as a character set name that will be
188 used when translating file names.
191 .Bl -tag -compact -width indent
193 The value is used as a character set name that will be
194 used when translating file names.
197 .Bl -tag -compact -width indent
199 Support Joliet extensions.
200 Defaults to enabled, use
204 Support RockRidge extensions.
205 Defaults to enabled, use
210 .Bl -tag -compact -width indent
212 The value is used as a character set name that will be
213 used when translating file names.
216 .Bl -tag -compact -width indent
218 Allow reading information missing from the mtree from the file system.
222 .Bl -tag -compact -width indent
224 The value is used as a character set name that will be
225 used when translating file names.
228 .Bl -tag -compact -width indent
230 Libarchive 2.x incorrectly encoded Unicode filenames on
232 This option mimics the libarchive 2.x filename handling
233 so that such archives can be read correctly.
235 The value is used as a character set name that will be
236 used when translating file names.
238 Support Mac OS metadata extension that records data in special
239 files beginning with a period and underscore.
240 Defaults to enabled on Mac OS, disabled on other platforms.
244 .It Cm read_concatenated_archives
245 Ignore zeroed blocks in the archive, which occurs when multiple tar archives
246 have been concatenated together.
247 Without this option, only the contents of
248 the first concatenated archive would be read.
253 Detailed error codes and textual descriptions are available from the
256 .Fn archive_error_string
262 .Xr archive_write_set_options 3 ,