File state machine to handle a payload within an rpm package. More...
#include "cpio.h"
Go to the source code of this file.
Data Structures | |
struct | hardLink_s |
Keeps track of the set of all hard links to a file in an archive. More... | |
struct | fsmIterator_s |
Iterator across package file info, forward on install, backward on erase. More... | |
struct | fsm_s |
File name and stat information. More... | |
Defines | |
#define | FSM_VERBOSE 0x8000 |
#define | FSM_INTERNAL 0x4000 |
#define | FSM_SYSCALL 0x2000 |
#define | FSM_DEAD 0x1000 |
#define | _fv(_a) ((_a) | FSM_VERBOSE) |
#define | _fi(_a) ((_a) | FSM_INTERNAL) |
#define | _fs(_a) ((_a) | (FSM_INTERNAL | FSM_SYSCALL)) |
#define | _fd(_a) ((_a) | (FSM_INTERNAL | FSM_DEAD)) |
Typedefs | |
typedef enum fileStage_e | fileStage |
Enumerations | |
enum | fileStage_e { FSM_UNKNOWN = 0, FSM_INIT = _fd(1), FSM_PRE = _fd(2), FSM_PROCESS = _fv(3), FSM_POST = _fd(4), FSM_UNDO = 5, FSM_FINI = 6, FSM_PKGINSTALL = _fd(7), FSM_PKGERASE = _fd(8), FSM_PKGBUILD = _fd(9), FSM_PKGCOMMIT = _fd(10), FSM_PKGUNDO = _fd(11), FSM_CREATE = _fd(17), FSM_MAP = _fd(18), FSM_MKDIRS = _fi(19), FSM_RMDIRS = _fi(20), FSM_MKLINKS = _fi(21), FSM_NOTIFY = _fd(22), FSM_DESTROY = _fd(23), FSM_VERIFY = _fd(24), FSM_COMMIT = _fd(25), FSM_UNLINK = _fs(33), FSM_RENAME = _fs(34), FSM_MKDIR = _fs(35), FSM_RMDIR = _fs(36), FSM_CHOWN = _fs(37), FSM_LCHOWN = _fs(38), FSM_CHMOD = _fs(39), FSM_UTIME = _fs(40), FSM_SYMLINK = _fs(41), FSM_LINK = _fs(42), FSM_MKFIFO = _fs(43), FSM_MKNOD = _fs(44), FSM_LSTAT = _fs(45), FSM_STAT = _fs(46), FSM_READLINK = _fs(47), FSM_CHROOT = _fs(48), FSM_NEXT = _fd(65), FSM_EAT = _fd(66), FSM_POS = _fd(67), FSM_PAD = _fd(68), FSM_TRAILER = _fd(69), FSM_HREAD = _fd(70), FSM_HWRITE = _fd(71), FSM_DREAD = _fs(72), FSM_DWRITE = _fs(73), FSM_ROPEN = _fs(129), FSM_READ = _fs(130), FSM_RCLOSE = _fs(131), FSM_WOPEN = _fs(132), FSM_WRITE = _fs(133), FSM_WCLOSE = _fs(134) } |
Functions | |
const char *const | fileStageString (fileStage a) |
Return formatted string representation of file stages. | |
const char *const | fileActionString (fileAction a) |
Return formatted string representation of file disposition. | |
FSM_t | newFSM (void) |
Create file state machine instance. | |
FSM_t | freeFSM (FSM_t fsm) |
Destroy file state machine instance. | |
int | fsmSetup (FSM_t fsm, fileStage goal, const rpmTransactionSet ts, const TFI_t fi, FD_t cfd, unsigned int *archiveSize, const char **failedFile) |
Load external data into file state machine. | |
int | fsmTeardown (FSM_t fsm) |
Clean file state machine. | |
rpmTransactionSet | fsmGetTs (const FSM_t fsm) |
Retrieve transaction set from file state machine iterator. | |
TFI_t | fsmGetFi (const FSM_t fsm) |
Retrieve transaction element file info from file state machine iterator. | |
int | fsmMapPath (FSM_t fsm) |
Map next file path and action. | |
int | fsmMapAttrs (FSM_t fsm) |
Map file stat(2) info. | |
int | fsmStage (FSM_t fsm, fileStage stage) |
File state machine driver. | |
Variables | |
int | _fsm_debug |
File state machine to handle a payload within an rpm package.
Definition in file fsm.h.
typedef enum fileStage_e fileStage |
enum fileStage_e |
const char* const fileActionString | ( | fileAction | a | ) |
const char* const fileStageString | ( | fileStage | a | ) |
rpmTransactionSet fsmGetTs | ( | const FSM_t | fsm | ) |
int fsmMapAttrs | ( | FSM_t | fsm | ) |
int fsmMapPath | ( | FSM_t | fsm | ) |
int fsmSetup | ( | FSM_t | fsm, | |
fileStage | goal, | |||
const rpmTransactionSet | ts, | |||
const TFI_t | fi, | |||
FD_t | cfd, | |||
unsigned int * | archiveSize, | |||
const char ** | failedFile | |||
) |
int fsmTeardown | ( | FSM_t | fsm | ) |
FSM_t newFSM | ( | void | ) |
int _fsm_debug |