rpm
5.2.1
|
![]() |
Data Structures | |
struct | dnli_s |
Directory name iterator. More... | |
struct | arHeader_s |
ar(1) archive header. More... | |
struct | cpioCrcPhysicalHeader_s |
Cpio archive header information. More... | |
struct | tarHeader_s |
Tar archive header information. More... | |
Files | |
file | fsm.c |
File state machine to handle a payload from a package. | |
file | fsm.h |
File state machine to handle a payload within an rpm package. | |
file | psm.c |
Package state machine to handle a package from a transaction set. | |
file | psm.h |
Package state machine to handle a package from a transaction set. | |
file | rpmlib.h |
In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not. | |
file | ar.c |
Handle ar(1) archives. | |
file | ar.h |
Structures used for ar(1) archives. | |
file | cpio.c |
Handle cpio(1) archives. | |
file | cpio.h |
Structures used for cpio(1) archives. | |
file | iosm.c |
File state machine to handle a payload from a package. | |
file | iosm.h |
File state machine to handle archive I/O and system call's. | |
file | tar.c |
Handle ustar archives. | |
file | tar.h |
Structures used for tar(1) archives. | |
Typedefs | |
typedef struct dnli_s * | DNLI_t |
Directory name iterator. | |
typedef struct iosm_s * | FSM_t |
File state machine data. | |
typedef struct iosmIterator_s * | FSMI_t |
Iterator across package file info, forward on install, backward on erase. | |
typedef struct dnli_s * | DNLI_t |
Directory name iterator. | |
typedef struct iosm_s * | IOSM_t |
File state machine data. | |
typedef enum iosmMapFlags_e | iosmMapFlags |
Enumerations | |
enum | iosmMapFlags_e { IOSM_MAP_PATH = (1 << 0), IOSM_MAP_MODE = (1 << 1), IOSM_MAP_UID = (1 << 2), IOSM_MAP_GID = (1 << 3), IOSM_FOLLOW_SYMLINKS = (1 << 4), IOSM_MAP_ABSOLUTE = (1 << 5), IOSM_MAP_ADDDOT = (1 << 6), IOSM_ALL_HARDLINKS = (1 << 7), IOSM_MAP_TYPE = (1 << 8), IOSM_SBIT_CHECK = (1 << 9), IOSM_PAYLOAD_LIST = (1 << 10), IOSM_PAYLOAD_EXTRACT = (1 << 11), IOSM_PAYLOAD_CREATE = (1 << 12) } |
Functions | |
static const char * | fsmFsPath (const IOSM_t fsm, const struct stat *st, const char *subdir, const char *suffix) |
Build path to file from file info, ornamented with subdir and suffix. | |
static void * | mapFreeIterator (void *p) |
Destroy file info iterator. | |
static void * | mapInitIterator (rpmfi fi, int reverse) |
Create file info iterator. | |
static int | mapNextIterator (void *a) |
Return next index into file info. | |
static int | cpioStrCmp (const void *a, const void *b) |
static int | mapFind (FSMI_t iter, const char *fsmPath) |
Locate archive path in file info. | |
static void * | dnlFreeIterator (const void *a) |
Destroy directory name iterator. | |
static int | dnlCount (const DNLI_t dnli) |
static int | dnlIndex (const DNLI_t dnli) |
static void * | dnlInitIterator (const IOSM_t fsm, int reverse) |
Create directory name iterator. | |
static const char * | dnlNextIterator (DNLI_t dnli) |
Return next directory name (from file info). | |
static int | saveHardLink (IOSM_t fsm) |
Save hard link in chain. | |
static void * | freeHardLink (struct hardLink_s *li) |
Destroy set of hard links. | |
static int | extractRegular (IOSM_t fsm) |
Create file from payload stream. | |
static int | writeFile (IOSM_t fsm, int writeData) |
Write next item to payload stream. | |
static int | writeLinkedFile (IOSM_t fsm) |
Write set of linked files to payload stream. | |
static int | fsmMakeLinks (IOSM_t fsm) |
Create pending hard links to existing file. | |
static int | fsmCommitLinks (IOSM_t fsm) |
Commit hard linked file set atomically. | |
static const char * | iosmFsPath (const IOSM_t iosm, const struct stat *st, const char *subdir, const char *suffix) |
Build path to file from file info, ornamented with subdir and suffix. | |
static int | iosmStrCmp (const void *a, const void *b) |
static int | mapFind (IOSMI_t iter, const char *iosmPath) |
Locate archive path in file info. | |
static int | iosmMakeLinks (IOSM_t iosm) |
Create pending hard links to existing file. | |
static int | iosmCommitLinks (IOSM_t iosm) |
Commit hard linked file set atomically. | |
char * | iosmStrerror (int rc) |
Return formatted error message on payload handling failure. |
typedef struct iosmIterator_s* FSMI_t |
typedef enum iosmMapFlags_e iosmMapFlags |
enum iosmMapFlags_e |
static int cpioStrCmp | ( | const void * | a, |
const void * | b | ||
) | [static] |
static int dnlCount | ( | const DNLI_t | dnli | ) | [inline, static] |
Definition at line 284 of file fsm.c.
References dnli_s::fi.
Referenced by fsmMkdirs(), fsmRmdirs(), iosmMkdirs(), and iosmRmdirs().
static void * dnlFreeIterator | ( | const void * | a | ) | [static] |
Destroy directory name iterator.
a | directory name iterator |
NULL | always |
Definition at line 272 of file fsm.c.
References _free(), and dnli_s::active.
Referenced by fsmMkdirs(), fsmRmdirs(), iosmMkdirs(), and iosmRmdirs().
static int dnlIndex | ( | const DNLI_t | dnli | ) | [inline, static] |
Definition at line 292 of file fsm.c.
References dnli_s::isave.
Referenced by fsmMkdirs(), fsmRmdirs(), iosmMkdirs(), and iosmRmdirs().
static void * dnlInitIterator | ( | const IOSM_t | iosm, |
int | reverse | ||
) | [static] |
Create directory name iterator.
fsm | file state machine data |
reverse | traverse directory names in reverse order? |
iosm | file state machine data |
reverse | traverse directory names in reverse order? |
Definition at line 306 of file fsm.c.
References dnli_s::active, D_, dnli_s::fi, fsmGetFi(), dnli_s::i, iosmFileActionSkipped(), reverse, dnli_s::reverse, rpmfiInit(), rpmfiNext(), rpmlog(), RPMLOG_DEBUG, urlPath(), and xcalloc().
Referenced by fsmMkdirs(), fsmRmdirs(), iosmMkdirs(), and iosmRmdirs().
static const char * dnlNextIterator | ( | DNLI_t | dnli | ) | [static] |
Return next directory name (from file info).
dnli | directory name iterator |
Definition at line 393 of file fsm.c.
References dnli_s::active, dnli_s::fi, dnli_s::i, dnli_s::isave, and dnli_s::reverse.
Referenced by fsmMkdirs(), fsmRmdirs(), iosmMkdirs(), and iosmRmdirs().
static int extractRegular | ( | IOSM_t | iosm | ) | [static] |
Create file from payload stream.
fsm | file state machine data |
iosm | file state machine data |
Definition at line 979 of file fsm.c.
References _free(), fdFiniDigest(), fdInitDigest(), Fflush(), Fileno(), fsmNext(), IOSM_DREAD, IOSM_NOTIFY, IOSM_WCLOSE, IOSM_WOPEN, and IOSM_WRITE.
Referenced by fsmStage(), and iosmStage().
static void * freeHardLink | ( | struct hardLink_s * | li | ) | [static] |
Destroy set of hard links.
li | set of hard links |
Definition at line 531 of file fsm.c.
References _free().
Referenced by freeFSM(), freeIOSM(), fsmStage(), and iosmStage().
static int fsmCommitLinks | ( | IOSM_t | fsm | ) | [static] |
Commit hard linked file set atomically.
fsm | file state machine data |
Definition at line 1321 of file fsm.c.
References _free(), fsmNext(), IOSM_COMMIT, IOSM_MAP, and iosmFileActionSkipped().
Referenced by fsmStage().
static const char* fsmFsPath | ( | const IOSM_t | fsm, |
const struct stat * | st, | ||
const char * | subdir, | ||
const char * | suffix | ||
) | [static] |
Build path to file from file info, ornamented with subdir and suffix.
fsm | file state machine data |
st | file stat info |
subdir | subdir to use (NULL disables) |
suffix | suffix to use (NULL disables) |
path | to file |
Definition at line 100 of file fsm.c.
References stpcpy(), and xmalloc().
Referenced by fsmMapPath(), and fsmStage().
static int fsmMakeLinks | ( | IOSM_t | fsm | ) | [static] |
Create pending hard links to existing file.
fsm | file state machine data |
Definition at line 1260 of file fsm.c.
References _free(), fsmNext(), fsmUNSAFE, IOSM_LINK, IOSM_MAP, IOSM_VERIFY, iosmFileActionSkipped(), and xstrdup().
Referenced by fsmStage().
static int iosmCommitLinks | ( | IOSM_t | iosm | ) | [static] |
Commit hard linked file set atomically.
iosm | file state machine data |
Definition at line 1377 of file iosm.c.
References _free(), IOSM_COMMIT, IOSM_MAP, iosmFileActionSkipped(), and iosmNext().
Referenced by iosmStage().
static const char* iosmFsPath | ( | const IOSM_t | iosm, |
const struct stat * | st, | ||
const char * | subdir, | ||
const char * | suffix | ||
) | [static] |
Build path to file from file info, ornamented with subdir and suffix.
iosm | file state machine data |
st | file stat info |
subdir | subdir to use (NULL disables) |
suffix | suffix to use (NULL disables) |
path | to file |
Definition at line 110 of file iosm.c.
References stpcpy(), and xmalloc().
Referenced by iosmMapPath(), and iosmStage().
static int iosmMakeLinks | ( | IOSM_t | iosm | ) | [static] |
Create pending hard links to existing file.
iosm | file state machine data |
Definition at line 1316 of file iosm.c.
References _free(), IOSM_LINK, IOSM_MAP, IOSM_VERIFY, iosmFileActionSkipped(), iosmNext(), iosmUNSAFE, and xstrdup().
Referenced by iosmStage().
static int iosmStrCmp | ( | const void * | a, |
const void * | b | ||
) | [static] |
char* iosmStrerror | ( | int | rc | ) |
Return formatted error message on payload handling failure.
rc | error code |
Definition at line 2769 of file iosm.c.
References _, errno, and xstrdup().
Referenced by cpio_doio(), and rpmpsmStage().
static int mapFind | ( | FSMI_t | iter, |
const char * | fsmPath | ||
) | [static] |
Locate archive path in file info.
iter | file info iterator |
fsmPath | archive path |
Definition at line 230 of file fsm.c.
References cpioStrCmp(), mapNextIterator(), and rpmfiFC().
Referenced by fsmStage().
static int mapFind | ( | IOSMI_t | iter, |
const char * | iosmPath | ||
) | [static] |
Locate archive path in file info.
iter | file info iterator |
iosmPath | archive path |
Definition at line 239 of file iosm.c.
References iosmStrCmp(), mapNextIterator(), and rpmfiFC().
Referenced by iosmStage().
static void * mapFreeIterator | ( | void * | p | ) | [static] |
Destroy file info iterator.
p | file info iterator |
NULL | always |
Definition at line 132 of file fsm.c.
References _free(), rpmfiUnlink(), and rpmtsFree().
Referenced by freeFSM(), freeIOSM(), fsmTeardown(), and iosmTeardown().
static void * mapInitIterator | ( | rpmfi | fi, |
int | reverse | ||
) | [static] |
Create file info iterator.
fi | transaction element file info |
reverse | iterate in reverse order? |
Definition at line 154 of file fsm.c.
References reverse, rpmfiLink(), and xcalloc().
Referenced by fsmSetup(), and iosmSetup().
static int mapNextIterator | ( | void * | a | ) | [static] |
Return next index into file info.
a | file info iterator |
Definition at line 174 of file fsm.c.
Referenced by fsmStage(), iosmStage(), and mapFind().
static int saveHardLink | ( | IOSM_t | iosm | ) | [static] |
Save hard link in chain.
fsm | file state machine data |
iosm | file state machine data |
Definition at line 445 of file fsm.c.
References _free(), fsmGetFi(), fsmNext(), IOSM_MAP, IOSM_PKGBUILD, IOSM_PKGINSTALL, iosmFileActionSkipped(), and xcalloc().
Referenced by fsmStage(), and iosmStage().
static int writeFile | ( | IOSM_t | iosm, |
int | writeData | ||
) | [static] |
Write next item to payload stream.
fsm | file state machine data |
writeData | should data be written? |
iosm | file state machine data |
writeData | should data be written? |
Definition at line 1051 of file fsm.c.
References alloca(), Fileno(), fsmGetFi(), fsmNext(), fsmUNSAFE, IOSM_DWRITE, IOSM_HWRITE, IOSM_MAP_ABSOLUTE, IOSM_MAP_ADDDOT, IOSM_MAP_PATH, IOSM_PAD, IOSM_RCLOSE, IOSM_READ, IOSM_READLINK, IOSM_ROPEN, S_ISLNK, stpcpy(), urlPath(), and xstrdup().
Referenced by fsmStage(), iosmStage(), and writeLinkedFile().
static int writeLinkedFile | ( | IOSM_t | iosm | ) | [static] |
Write set of linked files to payload stream.
fsm | file state machine data |
iosm | file state machine data |
Definition at line 1186 of file fsm.c.
References _free(), fsmNext(), IOSM_MAP, stpcpy(), tarHeaderWrite(), urlPath(), writeFile(), xmalloc(), and xstrdup().
Referenced by fsmStage(), and iosmStage().