ARCHIVE_READ_OPTIONS(3) | Library Functions Manual | ARCHIVE_READ_OPTIONS(3) |
NAME¶
archive_read_set_filter_option
,
archive_read_set_format_option
,
archive_read_set_option
,
archive_read_set_options
—
functions controlling options for reading
archives
LIBRARY¶
Streaming Archive Library (libarchive, -larchive)
SYNOPSIS¶
int
archive_read_set_filter_option
(struct
archive *, const char *module,
const char *option, const char
*value);
int
archive_read_set_format_option
(struct
archive *, const char *module,
const char *option, const char
*value);
int
archive_read_set_option
(struct archive
*, const char *module, const
char *option, const char *value);
int
archive_read_set_options
(struct
archive *, const char *options);
DESCRIPTION¶
These functions provide a way for libarchive clients to configure specific read modules.
archive_read_set_filter_option
(),archive_read_set_format_option
()- Specifies an option that will be passed to currently-registered filters
(including decompression filters) or format readers.
If option and value are both
NULL
, these functions will do nothing andARCHIVE_OK
will be returned. If option isNULL
but value is not, these functions will do nothing andARCHIVE_FAILED
will be returned.If module is not
NULL
, option and value will be provided to the filter or reader named module. The return value will be that of the module. If there is no such module,ARCHIVE_FAILED
will be returned.If module is
NULL
, option and value will be provided to every registered module. If any module returnsARCHIVE_FATAL
, this value will be returned immediately. Otherwise,ARCHIVE_OK
will be returned if any module accepts the option, andARCHIVE_FAILED
in all other cases. archive_read_set_option
()- Calls
archive_read_set_format_option
(), thenarchive_read_set_filter_option
(). If either function returnsARCHIVE_FATAL
,ARCHIVE_FATAL
will be returned immediately. Otherwise, greater of the two values will be returned. archive_read_set_options
()- options is a comma-separated list of options. If
options is
NULL
or empty,ARCHIVE_OK
will be returned immediately.Calls
archive_read_set_option
() with each option in turn. If anyarchive_read_set_option
() call returnsARCHIVE_FATAL
,ARCHIVE_FATAL
will be returned immediately.Individual options have one of the following forms:
- 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.
- option
- The option will be provided to every module with a value of “1”.
- !option
- The option will be provided to every module with a NULL value.
- module:option=value, module:option, module:!option
- As above, but the corresponding option and value will be provided only to modules whose name matches module.
OPTIONS¶
ERRORS¶
Detailed error codes and textual descriptions are available from
the archive_errno
() and
archive_error_string
() functions.
SEE ALSO¶
tar(1), libarchive(3), archive_write_set_options(3), archive_read(3)
February 2, 2012 | Linux 5.14.0-427.18.1.el9_4.x86_64 |