summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_read_set_options.3
blob: 81efb08b5af278662fd9f7043c32f68b6d767030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
.\" Copyright (c) 2011 Tim Kientzle
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd April 13, 2009
.Dt ARCHIVE_READ_OPTIONS 3
.Os
.Sh NAME
.Nm archive_read_set_filter_option ,
.Nm archive_read_set_format_option ,
.Nm archive_read_set_option ,
.Nm archive_read_set_options
.Nd functions controlling options for reading archives
.\"
.Sh SYNOPSIS
.Ft int
.Fo archive_read_set_filter_option
.Fa "struct archive *"
.Fa "const char *module"
.Fa "const char *option"
.Fa "const char *value"
.Fc
.Ft int
.Fo archive_read_set_format_option
.Fa "struct archive *"
.Fa "const char *module"
.Fa "const char *option"
.Fa "const char *value"
.Fc
.Ft int
.Fo archive_read_set_option
.Fa "struct archive *"
.Fa "const char *module"
.Fa "const char *option"
.Fa "const char *value"
.Fc
.Ft int
.Fo archive_read_set_options
.Fa "struct archive *"
.Fa "const char *options"
.Fc
.Sh DESCRIPTION
These functions provide a way for libarchive clients to configure
specific read modules.
.Bl -tag -width indent
.It Xo
.Fn archive_read_set_filter_option ,
.Fn archive_read_set_format_option
.Xc
Specifies an option that will be passed to currently-registered
filters (including decompression filters) or format readers.
.Pp
If
.Ar option
and
.Ar value
are both
.Dv NULL ,
these functions will do nothing and
.Cm ARCHIVE_OK
will be returned.
If
.Ar option
is
.Dv NULL
but
.Ar value
is not, these functions will do nothing and
.Cm ARCHIVE_FAILED
will be returned.
.Pp
If
.Ar module
is not
.Dv NULL ,
.Ar option
and
.Ar value
will be provided to the filter or reader named
.Ar module .
The return value will be that of the module.
If there is no such module,
.Cm ARCHIVE_FAILED
will be returned.
.Pp
If
.Ar module
is
.Dv NULL ,
.Ar option
and
.Ar value
will be provided to every registered module.
If any module returns
.Cm ARCHIVE_FATAL ,
this value will be returned immediately.
Otherwise,
.Cm ARCHIVE_OK
will be returned if any module accepts the option, and
.Cm ARCHIVE_FAILED
in all other cases.
.\"
.It Xo
.Fn archive_read_set_option
.Xc
Calls
.Fn archive_read_set_format_option ,
then
.Fn archive_read_set_filter_option .
If either function returns
.Cm ARCHIVE_FATAL ,
.Cm ARCHIVE_FATAL
will be returned
immediately.
Otherwise, greater of the two values will be returned.
.\"
.It Xo
.Fn archive_read_set_options
.Xc
.Ar options
is a comma-separated list of options.
If
.Ar options
is
.Dv NULL
or empty,
.Cm ARCHIVE_OK
will be returned immediately.
.Pp
Calls
.Fn archive_read_set_option
with each option in turn.
If any
.Fn archive_read_set_option
call returns
.Cm ARCHIVE_FATAL ,
.Cm ARCHIVE_FATAL
will be returned immediately.
.Pp
Individual options have one of the following forms:
.Bl -tag -compact -width indent
.It Ar option=value
The option/value pair will be provided to every module.
Modules that do not accept an option with this name will ignore it.
.It Ar option
The option will be provided to every module with a value of
.Dq 1 .
.It Ar !option
The option will be provided to every module with a NULL value.
.It Ar module:option=value , Ar module:option , Ar module:!option
As above, but the corresponding option and value will be provided
only to modules whose name matches
.Ar module .
.El
.El
.\"
.Sh OPTIONS
.Bl -tag -compact -width indent
.It Format iso9660
.Bl -tag -compact -width indent
.It Cm joliet
Support Joliet extensions.
Defaults to enabled, use
.Cm !joliet
to disable.
.It Cm rockridge
Support RockRidge extensions.
Defaults to enabled, use
.Cm !rockridge
to disable.
.El
.El
.\"
.Sh ERRORS
Detailed error codes and textual descriptions are available from the
.Fn archive_errno
and
.Fn archive_error_string
functions.
.\"
.Sh SEE ALSO
.Xr tar 1 ,
.Xr libarchive 3 ,
.Xr archive_write_set_options 3 ,
.Xr archive_read 3