|
rpm
5.2.1
|
|
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. | |
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... | |
Typedefs | |
| typedef struct dnli_s * | DNLI_t |
| Directory name iterator. More... | |
| typedef struct iosm_s * | FSM_t |
| File state machine data. More... | |
| typedef struct iosmIterator_s * | FSMI_t |
| Iterator across package file info, forward on install, backward on erase. More... | |
| typedef struct dnli_s * | DNLI_t |
| Directory name iterator. More... | |
| typedef struct iosm_s * | IOSM_t |
| File state machine data. More... | |
| 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. More... | |
| static void * | mapFreeIterator (void *p) |
| Destroy file info iterator. More... | |
| static void * | mapInitIterator (rpmfi fi, int reverse) |
| Create file info iterator. More... | |
| static int | mapNextIterator (void *a) |
| Return next index into file info. More... | |
| static int | cpioStrCmp (const void *a, const void *b) |
| static int | mapFind (FSMI_t iter, const char *fsmPath) |
| Locate archive path in file info. More... | |
| static void * | dnlFreeIterator (const void *a) |
| Destroy directory name iterator. More... | |
| 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. More... | |
| static const char * | dnlNextIterator (DNLI_t dnli) |
| Return next directory name (from file info). More... | |
| static int | saveHardLink (IOSM_t fsm) |
| Save hard link in chain. More... | |
| static void * | freeHardLink (struct hardLink_s *li) |
| Destroy set of hard links. More... | |
| static int | extractRegular (IOSM_t fsm) |
| Create file from payload stream. More... | |
| static int | writeFile (IOSM_t fsm, int writeData) |
| Write next item to payload stream. More... | |
| static int | writeLinkedFile (IOSM_t fsm) |
| Write set of linked files to payload stream. More... | |
| static int | fsmMakeLinks (IOSM_t fsm) |
| Create pending hard links to existing file. More... | |
| static int | fsmCommitLinks (IOSM_t fsm) |
| Commit hard linked file set atomically. More... | |
| 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. More... | |
| static int | iosmStrCmp (const void *a, const void *b) |
| static int | mapFind (IOSMI_t iter, const char *iosmPath) |
| Locate archive path in file info. More... | |
| static int | iosmMakeLinks (IOSM_t iosm) |
| Create pending hard links to existing file. More... | |
| static int | iosmCommitLinks (IOSM_t iosm) |
| Commit hard linked file set atomically. More... | |
| char * | iosmStrerror (int rc) |
| Return formatted error message on payload handling failure. More... | |
| typedef struct iosmIterator_s* FSMI_t |
| typedef enum iosmMapFlags_e iosmMapFlags |
| enum iosmMapFlags_e |
|
static |
|
inlinestatic |
Definition at line 284 of file fsm.c.
References dnli_s::fi.
Referenced by fsmMkdirs(), and fsmRmdirs().
|
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(), and fsmRmdirs().
|
inlinestatic |
Definition at line 292 of file fsm.c.
References dnli_s::isave.
Referenced by fsmMkdirs(), and fsmRmdirs().
|
static |
Create directory name iterator.
| fsm | 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(), and fsmRmdirs().
|
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(), and fsmRmdirs().
|
static |
Create file from payload stream.
| fsm | 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().
|
static |
Destroy set of hard links.
| li | set of hard links |
Definition at line 531 of file fsm.c.
References _free().
Referenced by freeFSM(), and fsmStage().
|
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 |
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 |
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 |
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 |
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 |
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 |
| 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 |
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 |
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 |
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(), and fsmTeardown().
|
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().
|
static |
Return next index into file info.
| a | file info iterator |
Definition at line 174 of file fsm.c.
Referenced by fsmStage(), and mapFind().
|
static |
Save hard link in chain.
| fsm | 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().
|
static |
Write next item to payload stream.
| fsm | 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(), and writeLinkedFile().
|
static |
Write set of linked files to payload stream.
| fsm | 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().
1.8.3.1