rpm
5.4.15
|
Go to the source code of this file.
Data Structures | |
struct | suffixPairs_s |
struct | name_id_map |
struct | option_map |
Macros | |
#define | _RPMIOB_INTERNAL |
#define | _RPMZ_INTERNAL |
#define | _RPMZ_INTERNAL_XZ |
#define | F_ISSET(_f, _FLAG) (((_f) & ((RPMZ_FLAGS_##_FLAG) & ~0x40000000)) != RPMZ_FLAGS_NONE) |
#define | RZ_ISSET(_FLAG) F_ISSET(z->flags, _FLAG) |
Enumerations | |
enum | { OPT_SUBBLOCK = INT_MIN, OPT_DELTA, OPT_LZMA1, OPT_LZMA2 } |
enum | { OPT_SIZE, OPT_RLE, OPT_ALIGN } |
enum | { OPT_DIST } |
enum | { OPT_PRESET, OPT_DICT, OPT_LC, OPT_LP, OPT_PB, OPT_MODE, OPT_NICE, OPT_MF, OPT_DEPTH } |
Functions | |
static int | checkfd (const char *devnull, int fdno, int flags) |
static void | io_init (void) |
static void | io_unlink (const char *fn, const struct stat *ost) |
static void | io_copy_attrs (rpmz z) |
static rpmuint64_t | physmem (void) |
static void | hw_cores (rpmz z) |
static void | hw_memlimit_init (rpmz z) |
static void | hw_init (rpmz z) |
static int | chkSuffix (const char *fn, const char *suffix) |
Check string for a suffix. More... | |
static char * | changeSuffix (const char *fn, const char *old, const char *new) |
Return (malloc'd) string with new suffix substituted for old. More... | |
static const char * | uncompressedFN (rpmz z) |
Return (malloc'd) uncompressed file name. More... | |
static const char * | compressedFN (rpmz z) |
Return (malloc'd) compressed file name. More... | |
static rpmRC | rpmzProcess (rpmz z, const char *ifn) |
static rpmRC | rpmzFini (rpmz z, rpmRC rc) |
static rpmRC | rpmzInit (rpmz z, const char *ifn) |
static rpmRC | rpmzCopy (rpmz z, rpmiob iob) |
static void | signals_init (void) |
static void | signals_fini (void) |
static int | signals_terminating (int terminate) |
static void | signals_exit (void) |
static void | parse_options (const char *str, const option_map *opts, void(*set)(void *filter_options, rpmuint32_t key, rpmuint64_t value), void *filter_options) |
static void | set_subblock (void *options, rpmuint32_t key, rpmuint64_t value) |
static lzma_options_subblock * | options_subblock (const char *str) |
static void | set_delta (void *options, rpmuint32_t key, rpmuint64_t value) |
static lzma_options_delta * | options_delta (const char *str) |
static void | set_lzma (void *options, rpmuint32_t key, rpmuint64_t value) |
static lzma_options_lzma * | options_lzma (const char *str) |
static void | coder_add_filter (rpmz z, lzma_vli id, void *options) |
static rpmuint64_t | hw_memlimit_encoder (rpmz z) |
static rpmuint64_t | hw_memlimit_decoder (rpmz z) |
static void | message_filters (int code, const lzma_filter *filters) |
static void | memlimit_too_small (rpmuint64_t memory_usage, rpmuint64_t memory_limit) |
static void | coder_set_compression_settings (rpmz z) |
void | rpmzArgCallback (poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, void *data) |
int | main (int argc, char *argv[]) |
Variables | |
static int | _debug = 0 |
struct rpmz_s | __rpmz |
rpmz | _rpmz = &__rpmz |
static struct suffixPairs_s | suffixPairs [] |
static int | signals_init_count |
static struct poptOption | rpmzFiltersPoptTable [] |
static struct poptOption | rpmzPrivatePoptTable [] |
static struct poptOption | optionsTable [] |
#define F_ISSET | ( | _f, | |
_FLAG | |||
) | (((_f) & ((RPMZ_FLAGS_##_FLAG) & ~0x40000000)) != RPMZ_FLAGS_NONE) |
Definition at line 65 of file rpmz.c.
Referenced by coder_set_compression_settings(), main(), rpmzFini(), and rpmzInit().
anonymous enum |
anonymous enum |
|
static |
Return (malloc'd) string with new suffix substituted for old.
fn | string |
old | old suffix |
new | new suffix |
Definition at line 457 of file rpmz.c.
References stpcpy(), and xmalloc.
Referenced by compressedFN(), and uncompressedFN().
|
static |
|
static |
Check string for a suffix.
fn | string |
suffix | suffix |
Definition at line 439 of file rpmz.c.
References _debug.
Referenced by compressedFN(), and uncompressedFN().
|
static |
Definition at line 1200 of file rpmz.c.
References _, __progname, and options.
Referenced by coder_set_compression_settings(), and rpmzArgCallback().
|
static |
Definition at line 1330 of file rpmz.c.
References _, coder_add_filter(), F_ISSET, hw_memlimit_decoder(), hw_memlimit_encoder(), i, memlimit_too_small(), message_filters(), rpmlog(), RPMLOG_CRIT, RPMLOG_DEBUG, RPMLOG_WARNING, RPMZ_FORMAT_LZMA, RPMZ_FORMAT_RAW, and RPMZ_MODE_COMPRESS.
Referenced by main().
|
static |
Return (malloc'd) compressed file name.
z | rpmz container |
Definition at line 513 of file rpmz.c.
References _debug, changeSuffix(), chkSuffix(), suffixPairs_s::csuffix, suffixPairs_s::format, rpmGetPath(), suffixPairs, and suffixPairs_s::usuffix.
Referenced by rpmzInit().
|
static |
|
static |
Definition at line 399 of file rpmz.c.
References hw_cores(), and hw_memlimit_init().
Referenced by main().
|
static |
Definition at line 1224 of file rpmz.c.
Referenced by coder_set_compression_settings().
|
static |
Definition at line 1217 of file rpmz.c.
Referenced by coder_set_compression_settings().
|
static |
|
static |
|
static |
|
static |
Definition at line 140 of file rpmz.c.
References _, errno, Lstat(), rpmlog(), RPMLOG_ERR, and Unlink().
Referenced by rpmzFini().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 1850 of file rpmz.c.
References __progname, __rpmz, _debug, _rpmz, argvAppend(), argvCount(), argvFree(), argvPrint(), bzdio, coder_set_compression_settings(), F_ISSET, gzdio, hw_init(), i, io_init(), lzdio, rpmiobFree(), rpmiobNew(), rpmioFini(), rpmioInit(), RPMRC_OK, RPMZ_FLAGS_KEEP, RPMZ_FLAGS_STDOUT, RPMZ_FORMAT_AUTO, RPMZ_FORMAT_BZIP2, RPMZ_FORMAT_GZIP, RPMZ_FORMAT_LZMA, RPMZ_FORMAT_RAW, RPMZ_FORMAT_XZ, RPMZ_FORMAT_ZIP2, RPMZ_FORMAT_ZLIB, RPMZ_MODE_COMPRESS, RPMZ_MODE_DECOMPRESS, RPMZ_MODE_TEST, rpmzProcess(), signals_exit(), signals_init(), signals_terminating(), snprintf(), and xzdio.
|
static |
Definition at line 1319 of file rpmz.c.
References _, EXIT_FAILURE, rpmlog(), and RPMLOG_CRIT.
Referenced by coder_set_compression_settings().
|
static |
< mask for one priority
Definition at line 1231 of file rpmz.c.
References __progname, i, mode, rpmlog(), RPMLOG_MASK, RPMLOG_PRI, rpmlogSetMask(), and stpcpy().
Referenced by coder_set_compression_settings().
|
static |
Definition at line 1089 of file rpmz.c.
References options, parse_options(), set_delta(), and xmalloc.
Referenced by rpmzArgCallback().
|
static |
Definition at line 1146 of file rpmz.c.
References options, parse_options(), set_lzma(), and xmalloc.
Referenced by rpmzArgCallback().
|
static |
Definition at line 1048 of file rpmz.c.
References options, parse_options(), set_subblock(), and xmalloc.
Referenced by rpmzArgCallback().
|
static |
Definition at line 941 of file rpmz.c.
References _, __progname, _free(), i, j, option_map::map, max, name, name_id_map::name, option_map::name, set(), v, and xstrdup().
Referenced by options_delta(), options_lzma(), and options_subblock().
|
static |
void rpmzArgCallback | ( | poptContext | con, |
enum poptCallbackReason | reason, | ||
const struct poptOption * | opt, | ||
const char * | arg, | ||
void * | data | ||
) |
Definition at line 1587 of file rpmz.c.
References _, __progname, _rpmz, arg, coder_add_filter(), OPT_DELTA, OPT_LZMA1, OPT_LZMA2, OPT_SUBBLOCK, options_delta(), options_lzma(), options_subblock(), RPMZ_FORMAT_AUTO, RPMZ_FORMAT_BZIP2, RPMZ_FORMAT_GZIP, RPMZ_FORMAT_LZMA, RPMZ_FORMAT_RAW, RPMZ_FORMAT_XZ, RPMZ_FORMAT_ZIP2, RPMZ_FORMAT_ZLIB, and VERSION.
Definition at line 766 of file rpmz.c.
References Ferror(), Fread(), Fwrite(), RPMRC_FAIL, and RPMRC_OK.
Referenced by rpmzProcess().
Definition at line 541 of file rpmz.c.
References _, _debug, _free(), errno, F_ISSET, Fclose(), Fflush(), io_copy_attrs(), io_unlink(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, RPMRC_OK, and Unlink().
Referenced by rpmzProcess().
Definition at line 594 of file rpmz.c.
References __progname, _debug, argvAdd(), argvFree(), Closedir(), compressedFN(), dirent, errno, F_ISSET, fdDup(), fdFree(), Ferror(), Fopen(), i, len, Lstat(), Opendir(), Readdir(), RPMRC_FAIL, RPMRC_OK, RPMZ_MODE_COMPRESS, RPMZ_MODE_DECOMPRESS, rpmzProcess(), S_ISLNK, Stat(), uncompressedFN(), and xstrdup().
Referenced by rpmzProcess().
Definition at line 786 of file rpmz.c.
References RPMRC_OK, rpmzCopy(), rpmzFini(), and rpmzInit().
Referenced by main(), and rpmzInit().
|
static |
Definition at line 1079 of file rpmz.c.
References OPT_DIST, and options.
Referenced by options_delta().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Return (malloc'd) uncompressed file name.
z | rpmz container |
Definition at line 484 of file rpmz.c.
References _debug, changeSuffix(), chkSuffix(), suffixPairs_s::csuffix, suffixPairs_s::format, suffixPairs, suffixPairs_s::usuffix, and xstrdup().
Referenced by rpmzInit().
struct rpmz_s __rpmz |
Definition at line 69 of file rpmz.c.
Referenced by main().
|
static |
Definition at line 33 of file rpmz.c.
Referenced by chkSuffix(), compressedFN(), main(), rpmzFini(), rpmzInit(), and uncompressedFN().
Definition at line 94 of file rpmz.c.
Referenced by main(), and rpmzArgCallback().
|
static |
Referenced by compressedFN(), and uncompressedFN().