rpm
5.4.15
|
#include "system.h"
#include <fnmatch.h>
#include <signal.h>
#include <stdarg.h>
#include <rpmio_internal.h>
#include <fts.h>
#include <ugid.h>
#include <poptIO.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | _node |
struct | rpmfts_s |
struct | exclude |
struct | _key |
Macros | |
#define | RPM_LIST_HEAD(name, type) struct name { struct type *lh_first; } |
#define | RPM_LIST_ENTRY(type) struct { struct type *le_next;struct type **le_prev; } |
#define | RPM_LIST_EMPTY(head) ((head)->lh_first == NULL) |
#define | RPM_LIST_FIRST(head) ((head)->lh_first) |
#define | RPM_LIST_NEXT(elm, field) ((elm)->field.le_next) |
#define | RPM_LIST_INIT(head) do { RPM_LIST_FIRST((head)) = NULL; } while (0) |
#define | RPM_LIST_INSERT_HEAD(head, elm, field) |
#define | RPM_LIST_FOREACH(var, head, field) for ((var) = RPM_LIST_FIRST((head)); (var); (var) = RPM_LIST_NEXT((var), field)) |
#define | _MTREE_INTERNAL |
#define | _KFB(n) (1U << (n)) |
#define | _MFB(n) (_KFB(n) | 0x40000000) |
#define | F_BLOCK 0x001 |
#define | F_CHAR 0x002 |
#define | F_DIR 0x004 |
#define | F_FIFO 0x008 |
#define | F_FILE 0x010 |
#define | F_LINK 0x020 |
#define | F_SOCK 0x040 |
#define | MF_ISSET(_FLAG) ((mtreeFlags & ((MTREE_FLAGS_##_FLAG) & ~0x40000000)) != MTREE_FLAGS_NONE) |
#define | KEYDEFAULT |
#define | MISMATCHEXIT 2 |
#define | MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) |
#define | NEEDVALUE 0xffffffff |
#define | COMPUTE(var, ch) (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)] |
#define | VIS_OCTAL 0x01 /* use octal \ddd format */ |
#define | VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */ |
#define | VIS_SP 0x04 /* also encode space */ |
#define | VIS_TAB 0x08 /* also encode tab */ |
#define | VIS_NL 0x10 /* also encode newline */ |
#define | VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) |
#define | VIS_SAFE 0x20 /* only encode "unsafe" characters */ |
#define | VIS_NOSLASH 0x40 /* inhibit printing '\' */ |
#define | UNVIS_VALID 1 /* character valid */ |
#define | UNVIS_VALIDPUSH 2 /* character valid, push back passed char */ |
#define | UNVIS_NOCHAR 3 /* valid sequence, no character produced */ |
#define | UNVIS_SYNBAD -1 /* unrecognized escape sequence */ |
#define | UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */ |
#define | UNVIS_END 1 /* no more characters */ |
#define | isoctal(c) (((unsigned char)(c)) >= '0' && ((unsigned char)(c)) <= '7') |
#define | isvisible(c) |
#define | S_GROUND 0 /* haven't seen escape char */ |
#define | S_START 1 /* start decoding special sequence */ |
#define | S_META 2 /* metachar started (M) */ |
#define | S_META1 3 /* metachar more, regular char (-) */ |
#define | S_CTRL 4 /* control char started (^) */ |
#define | S_OCTAL2 5 /* octal digit 2 */ |
#define | S_OCTAL3 6 /* octal digit 3 */ |
#define | KF_ISSET(_keys, _KEY) ((_keys) & (MTREE_KEYS_##_KEY)) |
#define | MAGIC "?*[" |
#define | FF(a, b, c, d) (((a)->flags & (c)) && ((b)->flags & (c)) && ((a)->d) != ((b)->d)) |
#define | FS(a, b, c, d) (((a)->flags & (c)) && ((b)->flags & (c)) && strcmp((a)->d,(b)->d)) |
#define | FM(a, b, c, d) (((a)->flags & (c)) && ((b)->flags & (c)) && memcmp(&(a)->d,&(b)->d, sizeof (a)->d)) |
#define | SKIPDOTSLASH(_f) ((_f)[0] == '.' && (_f)[1] == '/' ? (_f) + 2 : (_f)) |
#define | COMPAREINDENTNAMELEN 8 |
#define | LABEL |
#define | _FTSCALLOC(_p, _n) |
#define | CWALKINDENTNAMELEN 15 |
#define | MAXLINELEN 80 |
#define | MATCH(g, n) (fnmatch((g), (n), FNM_PATHNAME) == 0) |
#define | __getlogin getlogin |
Typedefs | |
typedef struct rpmfts_s * | rpmfts |
typedef struct _node | NODE |
typedef struct _key | KEY |
Enumerations | |
enum | mtreeFlags_e { MTREE_FLAGS_NONE = 0, MTREE_FLAGS_QUIET = ((1U << ( 0 )) | 0x40000000), MTREE_FLAGS_WARN = ((1U << ( 1 )) | 0x40000000), MTREE_FLAGS_CREATE = ((1U << ( 2 )) | 0x40000000), MTREE_FLAGS_DIRSONLY = ((1U << ( 3 )) | 0x40000000), MTREE_FLAGS_IGNORE = ((1U << ( 4 )) | 0x40000000), MTREE_FLAGS_INDENT = ((1U << ( 5 )) | 0x40000000), MTREE_FLAGS_LOOSE = ((1U << ( 6 )) | 0x40000000), MTREE_FLAGS_NOCOMMENT = ((1U << ( 7 )) | 0x40000000), MTREE_FLAGS_REMOVE = ((1U << ( 8 )) | 0x40000000), MTREE_FLAGS_SEEDED = ((1U << ( 9 )) | 0x40000000), MTREE_FLAGS_TOUCH = ((1U << ( 10 )) | 0x40000000), MTREE_FLAGS_UPDATE = ((1U << ( 11 )) | 0x40000000), MTREE_FLAGS_MISMATCHOK = ((1U << ( 12 )) | 0x40000000) } |
Bit field enum for mtree CLI options. More... | |
enum | mtreeKeys_e { MTREE_KEYS_NONE = 0, MTREE_KEYS_CKSUM = (1U << ( 0 )), MTREE_KEYS_DONE = (1U << ( 1 )), MTREE_KEYS_GID = (1U << ( 2 )), MTREE_KEYS_GNAME = (1U << ( 3 )), MTREE_KEYS_IGN = (1U << ( 4 )), MTREE_KEYS_MAGIC = (1U << ( 5 )), MTREE_KEYS_MODE = (1U << ( 6 )), MTREE_KEYS_NLINK = (1U << ( 7 )), MTREE_KEYS_SIZE = (1U << ( 8 )), MTREE_KEYS_SLINK = (1U << ( 9 )), MTREE_KEYS_TIME = (1U << ( 10 )), MTREE_KEYS_TYPE = (1U << ( 11 )), MTREE_KEYS_UID = (1U << ( 12 )), MTREE_KEYS_UNAME = (1U << ( 13 )), MTREE_KEYS_VISIT = (1U << ( 14 )), MTREE_KEYS_FLAGS = (1U << ( 15 )), MTREE_KEYS_NOCHANGE = (1U << ( 16 )), MTREE_KEYS_OPT = (1U << ( 17 )), MTREE_KEYS_DIGEST = (1U << ( 18 )) } |
Bit field enum for mtree keys. More... | |
Functions | |
static NODE * | mtreeSpec (rpmfts fts, FILE *fp) |
static int | mtreeVSpec (rpmfts fts) |
static int | mtreeCWalk (rpmfts fts) |
static int | mtreeVWalk (rpmfts fts) |
static void | mtreeMiss (rpmfts fts, NODE *p, char *tail) |
static void | mtree_error (const char *fmt,...) |
static int | keycompare (const void *a, const void *b) |
static unsigned | parsekey (char *name, uint32_t *needvaluep) |
static const char * | algo2tagname (uint32_t algo) |
static int | crc (FD_t fd, uint32_t *cval, uint32_t *clen) |
static char * | vis (char *dst, int c, int flag, int nextc) |
static int | strvis (char *dst, const char *src, int flag) |
static int | strunvis (char *dst, const char *src) |
static int | unvis (char *cp, char c, int *astate, int flag) |
static void | set (char *t, NODE *ip) |
static void | unset (char *t, NODE *ip) |
static const char * | ftype (unsigned type) |
static const char * | inotype (mode_t mode) |
static void | shownode (NODE *n, enum mtreeKeys_e keys, const char *path) |
static int | mismatch (NODE *n1, NODE *n2, enum mtreeKeys_e differ, const char *path) |
static int | compare_nodes (NODE *n1, NODE *n2, const char *path) |
static int | mtreeSWalk (NODE *t1, NODE *t2, const char *path) |
static const char * | rlink (const char *name) |
static const char * | algo2name (uint32_t algo) |
static int | compare (rpmfts fts, NODE *const s) |
static int | mtreeVisitD (rpmfts fts) |
static void | output (int indent, int *offset, const char *fmt,...) |
static void | mtreeVisitF (rpmfts fts) |
static void | mtreeReadExcludes (const char *fn) |
static int | mtreeCheckExcludes (const char *fname, const char *path) |
static int | dsort (const FTSENT **a, const FTSENT **b) |
static void | mtreeArgCallback (poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, void *data) |
int | main (int argc, char *argv[]) |
Variables | |
static const char | copyright [] |
static struct rpmfts_s | __rpmfts |
static rpmfts | _rpmfts = &__rpmfts |
static enum mtreeFlags_e | mtreeFlags = MTREE_FLAGS_NONE |
struct { | |
struct exclude * lh_first | |
} | excludes |
static struct rpmop_s | dc_totalops |
static struct rpmop_s | dc_readops |
static struct rpmop_s | dc_digestops |
static KEY | keylist [] |
static const uint32_t | crctab [] |
static struct poptOption | optionsTable [] |
#define __getlogin getlogin |
Definition at line 3648 of file rpmmtree.c.
Referenced by main().
#define _FTSCALLOC | ( | _p, | |
_n | |||
) |
Definition at line 2351 of file rpmmtree.c.
Referenced by mtreeVisitD().
#define _KFB | ( | n | ) | (1U << (n)) |
Definition at line 89 of file rpmmtree.c.
#define _MFB | ( | n | ) | (_KFB(n) | 0x40000000) |
Definition at line 90 of file rpmmtree.c.
#define _MTREE_INTERNAL |
Definition at line 86 of file rpmmtree.c.
#define COMPAREINDENTNAMELEN 8 |
Definition at line 2038 of file rpmmtree.c.
#define CWALKINDENTNAMELEN 15 |
Definition at line 2492 of file rpmmtree.c.
Referenced by mtreeVisitF(), and output().
#define F_BLOCK 0x001 |
block special
Definition at line 158 of file rpmmtree.c.
#define F_CHAR 0x002 |
char special
Definition at line 159 of file rpmmtree.c.
#define F_DIR 0x004 |
directory
Definition at line 160 of file rpmmtree.c.
Referenced by compare(), ftype(), mtreeMiss(), mtreeSpec(), mtreeSWalk(), mtreeVWalk(), and set().
#define F_FIFO 0x008 |
#define F_FILE 0x010 |
regular file
Definition at line 162 of file rpmmtree.c.
#define F_LINK 0x020 |
symbolic link
Definition at line 163 of file rpmmtree.c.
Referenced by compare(), compare_nodes(), ftype(), mtreeMiss(), and set().
#define F_SOCK 0x040 |
Definition at line 1763 of file rpmmtree.c.
Referenced by compare_nodes().
#define FM | ( | a, | |
b, | |||
c, | |||
d | |||
) | (((a)->flags & (c)) && ((b)->flags & (c)) && memcmp(&(a)->d,&(b)->d, sizeof (a)->d)) |
Definition at line 1767 of file rpmmtree.c.
Referenced by compare_nodes().
Definition at line 1765 of file rpmmtree.c.
Referenced by compare_nodes().
#define isoctal | ( | c | ) | (((unsigned char)(c)) >= '0' && ((unsigned char)(c)) <= '7') |
Definition at line 604 of file rpmmtree.c.
#define isvisible | ( | c | ) |
Definition at line 605 of file rpmmtree.c.
Referenced by vis().
#define KEYDEFAULT |
Definition at line 262 of file rpmmtree.c.
Referenced by main().
#define KF_ISSET | ( | _keys, | |
_KEY | |||
) | ((_keys) & (MTREE_KEYS_##_KEY)) |
Definition at line 1569 of file rpmmtree.c.
Referenced by compare(), compare_nodes(), main(), mtreeArgCallback(), mtreeMiss(), mtreeSpec(), mtreeVisitD(), mtreeVisitF(), mtreeVWalk(), and shownode().
#define LABEL |
Definition at line 2039 of file rpmmtree.c.
Referenced by compare().
#define MAGIC "?*[" |
Referenced by mtreeSpec(), and mtreeVWalk().
#define MATCH | ( | g, | |
n | |||
) | (fnmatch((g), (n), FNM_PATHNAME) == 0) |
Referenced by mtreeCheckExcludes().
#define MAXLINELEN 80 |
Definition at line 2493 of file rpmmtree.c.
Referenced by mtreeVisitF(), and output().
#define MBITS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) |
Definition at line 268 of file rpmmtree.c.
Referenced by compare(), main(), mtreeVisitD(), and mtreeVisitF().
#define MF_ISSET | ( | _FLAG | ) | ((mtreeFlags & ((MTREE_FLAGS_##_FLAG) & ~0x40000000)) != MTREE_FLAGS_NONE) |
Definition at line 260 of file rpmmtree.c.
Referenced by compare(), main(), mtreeCWalk(), mtreeMiss(), mtreeVisitD(), mtreeVisitF(), and mtreeVWalk().
#define MISMATCHEXIT 2 |
Definition at line 266 of file rpmmtree.c.
Referenced by main(), mtreeVSpec(), and mtreeVWalk().
#define NEEDVALUE 0xffffffff |
Definition at line 330 of file rpmmtree.c.
#define RPM_LIST_EMPTY | ( | head | ) | ((head)->lh_first == NULL) |
Definition at line 70 of file rpmmtree.c.
Definition at line 68 of file rpmmtree.c.
#define RPM_LIST_FIRST | ( | head | ) | ((head)->lh_first) |
Definition at line 72 of file rpmmtree.c.
#define RPM_LIST_FOREACH | ( | var, | |
head, | |||
field | |||
) | for ((var) = RPM_LIST_FIRST((head)); (var); (var) = RPM_LIST_NEXT((var), field)) |
Definition at line 83 of file rpmmtree.c.
Referenced by mtreeCheckExcludes().
Definition at line 66 of file rpmmtree.c.
#define RPM_LIST_INIT | ( | head | ) | do { RPM_LIST_FIRST((head)) = NULL; } while (0) |
Definition at line 76 of file rpmmtree.c.
Referenced by main().
#define RPM_LIST_INSERT_HEAD | ( | head, | |
elm, | |||
field | |||
) |
Definition at line 78 of file rpmmtree.c.
Referenced by mtreeReadExcludes().
#define RPM_LIST_NEXT | ( | elm, | |
field | |||
) | ((elm)->field.le_next) |
Definition at line 74 of file rpmmtree.c.
#define S_CTRL 4 /* control char started (^) */ |
Definition at line 791 of file rpmmtree.c.
Referenced by unvis().
#define S_GROUND 0 /* haven't seen escape char */ |
Definition at line 787 of file rpmmtree.c.
Referenced by unvis().
#define S_META 2 /* metachar started (M) */ |
Definition at line 789 of file rpmmtree.c.
Referenced by unvis().
#define S_META1 3 /* metachar more, regular char (-) */ |
Definition at line 790 of file rpmmtree.c.
Referenced by unvis().
#define S_OCTAL2 5 /* octal digit 2 */ |
Definition at line 792 of file rpmmtree.c.
Referenced by unvis().
#define S_OCTAL3 6 /* octal digit 3 */ |
Definition at line 793 of file rpmmtree.c.
Referenced by unvis().
#define S_START 1 /* start decoding special sequence */ |
Definition at line 788 of file rpmmtree.c.
Referenced by unvis().
#define SKIPDOTSLASH | ( | _f | ) | ((_f)[0] == '.' && (_f)[1] == '/' ? (_f) + 2 : (_f)) |
Definition at line 2036 of file rpmmtree.c.
Referenced by mtreeVisitD(), and mtreeVWalk().
#define UNVIS_END 1 /* no more characters */ |
Definition at line 587 of file rpmmtree.c.
Referenced by strunvis(), and unvis().
#define UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */ |
Definition at line 582 of file rpmmtree.c.
#define UNVIS_NOCHAR 3 /* valid sequence, no character produced */ |
Definition at line 580 of file rpmmtree.c.
Referenced by strunvis(), and unvis().
#define UNVIS_SYNBAD -1 /* unrecognized escape sequence */ |
Definition at line 581 of file rpmmtree.c.
Referenced by unvis().
#define UNVIS_VALID 1 /* character valid */ |
Definition at line 578 of file rpmmtree.c.
Referenced by strunvis(), and unvis().
#define UNVIS_VALIDPUSH 2 /* character valid, push back passed char */ |
Definition at line 579 of file rpmmtree.c.
Referenced by strunvis(), and unvis().
#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropriate */ |
Definition at line 558 of file rpmmtree.c.
Referenced by vis().
#define VIS_NL 0x10 /* also encode newline */ |
Definition at line 566 of file rpmmtree.c.
#define VIS_NOSLASH 0x40 /* inhibit printing '\' */ |
Definition at line 573 of file rpmmtree.c.
Referenced by vis().
#define VIS_OCTAL 0x01 /* use octal \ddd format */ |
Definition at line 557 of file rpmmtree.c.
Referenced by mtreeVisitF(), and vis().
#define VIS_SAFE 0x20 /* only encode "unsafe" characters */ |
Definition at line 568 of file rpmmtree.c.
#define VIS_SP 0x04 /* also encode space */ |
Definition at line 564 of file rpmmtree.c.
#define VIS_TAB 0x08 /* also encode tab */ |
Definition at line 565 of file rpmmtree.c.
Definition at line 567 of file rpmmtree.c.
Referenced by mtreeVisitF().
Definition at line 115 of file rpmmtree.c.
enum mtreeFlags_e |
Bit field enum for mtree CLI options.
Definition at line 95 of file rpmmtree.c.
enum mtreeKeys_e |
Bit field enum for mtree keys.
Definition at line 121 of file rpmmtree.c.
|
static |
Definition at line 2046 of file rpmmtree.c.
References PGPHASHALGO_ADLER32, PGPHASHALGO_CRC32, PGPHASHALGO_CRC64, PGPHASHALGO_HAVAL_5_160, PGPHASHALGO_JLU32, PGPHASHALGO_MD2, PGPHASHALGO_MD4, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_RIPEMD256, PGPHASHALGO_RIPEMD320, PGPHASHALGO_SALSA10, PGPHASHALGO_SALSA20, PGPHASHALGO_SHA1, PGPHASHALGO_SHA224, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, and PGPHASHALGO_TIGER192.
Referenced by compare().
|
static |
Definition at line 405 of file rpmmtree.c.
References PGPHASHALGO_ADLER32, PGPHASHALGO_CRC32, PGPHASHALGO_CRC64, PGPHASHALGO_HAVAL_5_160, PGPHASHALGO_JLU32, PGPHASHALGO_MD2, PGPHASHALGO_MD4, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_RIPEMD256, PGPHASHALGO_RIPEMD320, PGPHASHALGO_SALSA10, PGPHASHALGO_SALSA20, PGPHASHALGO_SHA1, PGPHASHALGO_SHA224, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, and PGPHASHALGO_TIGER192.
Referenced by mtreeVisitF(), and shownode().
< block special
< char special
< directory
< fifo
< regular file
< symbolic link
< socket
< directory
Definition at line 2078 of file rpmmtree.c.
References _, _free(), algo2name(), _node::algos, buffer, Chmod(), Chown(), _node::cksum, crc(), _node::digests, errno, F_BLOCK, F_CHAR, F_DIR, F_FIFO, F_FILE, F_LINK, F_SOCK, Fclose(), fdFiniDigest(), fdInitDigest(), FDSTAT_DIGEST, fdstat_op(), FDSTAT_READ, Ferror(), _node::flags, Fopen(), Fread(), Fstrerror(), _ftsent::fts_accpath, _ftsent::fts_statp, ftype(), i, inotype(), KF_ISSET, L, LABEL, MBITS, MF_ISSET, mode, name, _node::name, ARGI_s::nvals, rpmfts_s::p, rlink(), rpmswAdd(), S_ISLNK, S_ISSOCK, _node::sb, skip, _node::slink, TIMESPEC_TO_TIMEVAL, _node::type, Utimes(), and ARGI_s::vals.
Referenced by mtreeVWalk().
< symbolic link
< symbolic link
Definition at line 1855 of file rpmmtree.c.
References _node::algos, _node::digests, F_LINK, FF, _node::flags, FM, FS, i, KF_ISSET, mismatch(), MTREE_KEYS_CKSUM, MTREE_KEYS_DIGEST, MTREE_KEYS_FLAGS, MTREE_KEYS_GID, MTREE_KEYS_GNAME, MTREE_KEYS_MODE, MTREE_KEYS_NLINK, MTREE_KEYS_NONE, MTREE_KEYS_SIZE, MTREE_KEYS_SLINK, MTREE_KEYS_TIME, MTREE_KEYS_UID, MTREE_KEYS_UNAME, ARGI_s::nvals, _node::type, and ARGI_s::vals.
Referenced by mtreeSWalk(), and mtreeVSpec().
|
static |
Definition at line 515 of file rpmmtree.c.
References COMPUTE, rpmfts_s::crc_total, Ferror(), Fread(), and len.
Referenced by __crc32(), __crc64(), compare(), mtreeVisitF(), pgpArmorUnwrap(), and pgpCRC().
Definition at line 2816 of file rpmmtree.c.
Referenced by mtreeCWalk().
|
static |
< block special
< char special
< directory
< fifo
< regular file
< symbolic link
< socket
Definition at line 1701 of file rpmmtree.c.
References F_BLOCK, F_CHAR, F_DIR, F_FIFO, F_FILE, F_LINK, and F_SOCK.
Referenced by compare(), rpmfcClassify(), and shownode().
|
static |
Definition at line 1719 of file rpmmtree.c.
References S_IFSOCK.
Referenced by compare(), and mtreeVisitF().
|
static |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 3652 of file rpmmtree.c.
References _, __getlogin, __progname, _free(), _rpmfts, _rpmsw_stats, argvFree(), rpmfts_s::crc_total, errno, FTS_LOGICAL, FTS_PHYSICAL, rpmfts_s::ftsoptions, rpmfts_s::fullpath, rpmfts_s::g, host, i, KEYDEFAULT, rpmfts_s::keys, KF_ISSET, rpmfts_s::m, rpmfts_s::maxg, MAXHOSTNAMELEN, rpmfts_s::maxm, MAXPATHLEN, rpmfts_s::maxu, MBITS, MF_ISSET, MISMATCHEXIT, mtree_error(), MTREE_FLAGS_SEEDED, mtreeCWalk(), mtreeFlags, mtreeMiss(), mtreeSpec(), mtreeVSpec(), mtreeVWalk(), rpmfts_s::path, rpmfts_s::paths, Realpath(), rpmfts_s::root, RPM_LIST_INIT, rpmExpand(), rpmfiFree(), rpmGenPath(), rpmGetPath(), rpmioFini(), rpmioFtsOpts, rpmioInit(), rpmswEnter(), rpmswExit(), rpmswPrint(), rpmtsFree(), rpmfts_s::sb, rpmfts_s::spec1, rpmfts_s::spec2, Stat(), tagClean(), time, rpmfts_s::u, URL_IS_DASH, URL_IS_UNKNOWN, urlPath(), xcalloc(), xmalloc, and xstrdup().
|
static |
Definition at line 1830 of file rpmmtree.c.
References rpmfts_s::keys, and shownode().
Referenced by compare_nodes().
|
static |
Definition at line 309 of file rpmmtree.c.
References _, __progname, EXIT_FAILURE, and rpmfts_s::lineno.
Referenced by main(), mtreeArgCallback(), mtreeCWalk(), mtreeSpec(), mtreeVisitD(), mtreeVisitF(), mtreeVWalk(), parsekey(), rlink(), and set().
|
static |
Definition at line 3470 of file rpmmtree.c.
References _, __progname, rpmfts_s::algos, argiAdd(), errno, EXIT_FAILURE, FTS_LOGICAL, FTS_PHYSICAL, rpmfts_s::keys, KF_ISSET, mtree_error(), MTREE_KEYS_TYPE, mtreeReadExcludes(), parsekey(), rpmioFtsOpts, rpmfts_s::spec1, rpmfts_s::spec2, and type.
|
static |
Definition at line 2796 of file rpmmtree.c.
References exclude::glob, MATCH, exclude::pathname, and RPM_LIST_FOREACH.
Referenced by mtreeCWalk(), and mtreeVWalk().
|
static |
Definition at line 3173 of file rpmmtree.c.
References __progname, chkSuffix(), dsort(), errno, Fts_close(), FTS_COMFOLLOW, FTS_D, FTS_DNR, FTS_DP, FTS_ERR, _ftsent::fts_errno, _ftsent::fts_info, _ftsent::fts_level, _ftsent::fts_name, FTS_NOCHDIR, FTS_NS, Fts_open(), _ftsent::fts_path, Fts_read(), Fts_set(), FTS_SKIP, rpmfts_s::ftsoptions, indent, rpmfts_s::keys, MF_ISSET, mtree_error(), MTREE_KEYS_SLINK, mtreeCheckExcludes(), mtreeVisitD(), mtreeVisitF(), rpmfts_s::p, rpmfts_s::paths, and rpmfts_s::t.
Referenced by main().
< directory
< directory
< symbolic link
< symbolic link
< symbolic link
Definition at line 3241 of file rpmmtree.c.
References _, _node::child, Chmod(), Chown(), errno, F_DIR, F_LINK, _node::flags, KF_ISSET, lchown, MF_ISSET, Mkdir(), MTREE_KEYS_VISIT, _node::name, _node::next, rpmfts_s::path, _node::sb, _node::slink, Stat(), Symlink(), _node::type, and type.
Referenced by main().
|
static |
Definition at line 2751 of file rpmmtree.c.
References _, __progname, buffer, EXIT_FAILURE, Fclose(), fdGetFILE, Ferror(), Fopen(), Fstrerror(), exclude::glob, len, exclude::pathname, RPM_LIST_INSERT_HEAD, xmalloc, and xstrdup().
Referenced by mtreeArgCallback().
< directory
< directory
Definition at line 1573 of file rpmmtree.c.
References _, __progname, _node::child, F_DIR, _node::flags, KF_ISSET, rpmfts_s::lineno, MAGIC, mtree_error(), MTREE_KEYS_DONE, MTREE_KEYS_MAGIC, _node::name, _node::next, _node::parent, _node::prev, set(), strunvis(), _node::type, unset(), and xcalloc().
Referenced by main(), and mtreeVSpec().
< directory
< directory
< directory
< directory
< directory
< directory
< directory
< directory
Definition at line 1938 of file rpmmtree.c.
References _node::child, compare_nodes(), F_DIR, i, _node::name, _node::next, and _node::type.
Referenced by mtreeVSpec().
|
static |
Definition at line 2357 of file rpmmtree.c.
References _, __progname, _free(), _FTSCALLOC, errno, Fts_children(), _ftsent::fts_link, _ftsent::fts_path, _ftsent::fts_statp, rpmfts_s::g, gidToGname(), rpmfts_s::keys, KF_ISSET, rpmfts_s::m, rpmfts_s::maxg, rpmfts_s::maxm, rpmfts_s::maxu, MBITS, MF_ISSET, mtree_error(), rpmfts_s::p, rpmfts_s::sb, rpmfts_s::sb_is_valid, SKIPDOTSLASH, rpmfts_s::t, rpmfts_s::u, and uidToUname().
Referenced by mtreeCWalk().
|
static |
Definition at line 2516 of file rpmmtree.c.
References _, __progname, _free(), algo2tagname(), rpmfts_s::algos, buffer, crc(), CWALKINDENTNAMELEN, Fclose(), fdFiniDigest(), fdInitDigest(), FDSTAT_DIGEST, fdstat_op(), FDSTAT_READ, Ferror(), Fopen(), Fread(), Fstrerror(), _ftsent::fts_accpath, _ftsent::fts_info, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_namelen, FTS_SL, FTS_SLNONE, _ftsent::fts_statp, gidToGname(), i, indent, inotype(), rpmfts_s::keys, KF_ISSET, L, len, MAXLINELEN, MBITS, MF_ISSET, mtree_error(), name, ARGI_s::nvals, output(), rpmfts_s::p, rlink(), rpmswAdd(), S_ISLNK, rpmfts_s::sb, strvis(), TIMESPEC_TO_TIMEVAL, uidToUname(), ARGI_s::vals, VIS_OCTAL, VIS_WHITE, and xmalloc.
Referenced by mtreeCWalk().
|
static |
Definition at line 2007 of file rpmmtree.c.
References compare_nodes(), MISMATCHEXIT, mtreeSpec(), mtreeSWalk(), rpmfts_s::spec1, and rpmfts_s::spec2.
Referenced by main().
|
static |
< directory
Definition at line 3347 of file rpmmtree.c.
References _, __progname, _node::child, chkSuffix(), compare(), errno, F_DIR, _node::flags, FNM_PATHNAME, fnmatch(), _ftsent::fts_accpath, Fts_close(), FTS_COMFOLLOW, FTS_D, FTS_DNR, FTS_DP, FTS_ERR, _ftsent::fts_errno, _ftsent::fts_info, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_namelen, FTS_NOCHDIR, FTS_NS, Fts_open(), _ftsent::fts_path, Fts_read(), Fts_set(), FTS_SKIP, FTS_SL, _ftsent::fts_statp, rpmfts_s::ftsoptions, rpmfts_s::keys, KF_ISSET, MAGIC, MF_ISSET, MISMATCHEXIT, mtree_error(), MTREE_KEYS_SLINK, MTREE_KEYS_VISIT, mtreeCheckExcludes(), _node::name, _node::next, rpmfts_s::p, _node::parent, rpmfts_s::paths, _node::prev, Rmdir(), rpmfts_s::root, SKIPDOTSLASH, rpmfts_s::t, _node::type, and Unlink().
Referenced by main().
|
static |
Definition at line 2497 of file rpmmtree.c.
References CWALKINDENTNAMELEN, indent, MAXLINELEN, and vsnprintf().
Referenced by mtreeVisitF(), and rpmgitCmdCommit().
|
static |
Definition at line 382 of file rpmmtree.c.
References keycompare(), mtree_error(), name, and key_s::name.
Referenced by mtreeArgCallback(), set(), and unset().
|
static |
Definition at line 2022 of file rpmmtree.c.
References errno, len, MAXPATHLEN, mtree_error(), and Readlink().
Referenced by compare(), and mtreeVisitF().
|
static |
< block special
< char special
< directory
< regular file
< fifo
< symbolic link
< socket
Definition at line 1408 of file rpmmtree.c.
References _, __progname, _node::algos, argiAdd(), argvAdd(), _node::cksum, _node::digests, errno, F_BLOCK, F_CHAR, F_DIR, F_FIFO, F_FILE, F_LINK, F_SOCK, _node::flags, gnameToGid(), mtree_error(), MTREE_KEYS_CKSUM, MTREE_KEYS_DIGEST, MTREE_KEYS_DONE, MTREE_KEYS_FLAGS, MTREE_KEYS_GID, MTREE_KEYS_GNAME, MTREE_KEYS_IGN, MTREE_KEYS_MAGIC, MTREE_KEYS_MODE, MTREE_KEYS_NLINK, MTREE_KEYS_NOCHANGE, MTREE_KEYS_NONE, MTREE_KEYS_OPT, MTREE_KEYS_SIZE, MTREE_KEYS_SLINK, MTREE_KEYS_TIME, MTREE_KEYS_TYPE, MTREE_KEYS_UID, MTREE_KEYS_UNAME, MTREE_KEYS_VISIT, parsekey(), _node::sb, _node::slink, strunvis(), _node::type, type, unameToUid(), and xmalloc.
Referenced by dbiFreeIndexSet(), dbiMireKeys(), mtreeSpec(), parse_options(), rpmmiGrowBasename(), rpmmiInit(), rpmsetFini(), rpmsetGetPool(), and rpmsetNew().
|
static |
Definition at line 1771 of file rpmmtree.c.
References _free(), algo2tagname(), _node::algos, _node::cksum, _node::digests, ftype(), gidToGname(), i, KF_ISSET, _node::name, ARGI_s::nvals, _node::sb, _node::type, uidToUname(), and ARGI_s::vals.
Referenced by mismatch().
|
static |
Definition at line 956 of file rpmmtree.c.
References unvis(), UNVIS_END, UNVIS_NOCHAR, UNVIS_VALID, and UNVIS_VALIDPUSH.
Referenced by mtreeSpec(), and set().
|
static |
|
static |
Definition at line 1559 of file rpmmtree.c.
References _node::flags, and parsekey().
Referenced by mtreeSpec().
|
static |
Definition at line 803 of file rpmmtree.c.
References isoctal, S_CTRL, S_GROUND, S_META, S_META1, S_OCTAL2, S_OCTAL3, S_START, UNVIS_END, UNVIS_NOCHAR, UNVIS_SYNBAD, UNVIS_VALID, and UNVIS_VALIDPUSH.
Referenced by strunvis().
|
static |
Definition at line 618 of file rpmmtree.c.
References isoctal, isvisible, VIS_CSTYLE, VIS_NOSLASH, and VIS_OCTAL.
Referenced by strvis().
|
static |
Definition at line 271 of file rpmmtree.c.
Definition at line 273 of file rpmmtree.c.
Referenced by main().
|
static |
Definition at line 35 of file rpmmtree.c.
|
static |
Definition at line 453 of file rpmmtree.c.
|
static |
Definition at line 295 of file rpmmtree.c.
|
static |
Definition at line 292 of file rpmmtree.c.
|
static |
Definition at line 289 of file rpmmtree.c.
struct { ... } excludes |
|
static |
Definition at line 336 of file rpmmtree.c.
struct exclude* lh_first |
Definition at line 286 of file rpmmtree.c.
|
static |
Definition at line 276 of file rpmmtree.c.
Referenced by main().
|
static |
Definition at line 3542 of file rpmmtree.c.