rpm
4.5
|
Structures used to handle cpio payloads within rpm packages. More...
Go to the source code of this file.
Data Structures | |
struct | cpioCrcPhysicalHeader |
Cpio archive header information. More... | |
Macros | |
#define | CPIOERR_CHECK_ERRNO 0x00008000 |
#define | CPIO_NEWC_MAGIC "070701" |
#define | CPIO_CRC_MAGIC "070702" |
#define | CPIO_TRAILER "TRAILER!!!" |
#define | PHYS_HDR_SIZE 110 /* Don't depend on sizeof(struct) */ |
Typedefs | |
typedef enum cpioMapFlags_e | cpioMapFlags |
Functions | |
int | cpioTrailerWrite (FSM_t fsm) |
Write cpio trailer. More... | |
int | cpioHeaderWrite (FSM_t fsm, struct stat *st) |
Write cpio header. More... | |
int | cpioHeaderRead (FSM_t fsm, struct stat *st) |
Read cpio header. More... | |
const char * | cpioStrerror (int rc) |
Return formatted error message on payload handling failure. More... | |
Variables | |
int | _cpio_debug |
Structures used to handle cpio payloads within rpm packages.
Definition in file cpio.h.
#define CPIO_CRC_MAGIC "070702" |
Definition at line 75 of file cpio.h.
Referenced by cpioHeaderRead().
#define CPIO_NEWC_MAGIC "070701" |
Definition at line 74 of file cpio.h.
Referenced by cpioHeaderRead(), cpioHeaderWrite(), and cpioTrailerWrite().
#define CPIO_TRAILER "TRAILER!!!" |
Definition at line 76 of file cpio.h.
Referenced by cpioTrailerWrite(), and fsmStage().
#define PHYS_HDR_SIZE 110 /* Don't depend on sizeof(struct) */ |
Definition at line 98 of file cpio.h.
Referenced by cpioHeaderRead(), cpioHeaderWrite(), and cpioTrailerWrite().
int cpioHeaderRead | ( | FSM_t | fsm, |
struct stat * | st | ||
) |
Read cpio header.
fsm | file path and stat info |
st |
Definition at line 148 of file cpio.c.
References _cpio_debug, _free(), CPIO_CRC_MAGIC, CPIO_NEWC_MAGIC, CPIOERR_BAD_HEADER, CPIOERR_BAD_MAGIC, CPIOERR_READ_FAILED, cpioCrcPhysicalHeader::devMajor, cpioCrcPhysicalHeader::devMinor, cpioCrcPhysicalHeader::filesize, FSM_DREAD, FSM_POS, fsmNext(), GET_NUM_FIELD, cpioCrcPhysicalHeader::gid, cpioCrcPhysicalHeader::inode, fsm_s::lpath, cpioCrcPhysicalHeader::magic, major, makedev, minor, cpioCrcPhysicalHeader::mode, cpioCrcPhysicalHeader::mtime, cpioCrcPhysicalHeader::namesize, cpioCrcPhysicalHeader::nlink, fsm_s::path, PHYS_HDR_SIZE, cpioCrcPhysicalHeader::rdevMajor, cpioCrcPhysicalHeader::rdevMinor, fsm_s::rdnb, S_ISLNK, cpioCrcPhysicalHeader::uid, fsm_s::wrbuf, fsm_s::wrlen, fsm_s::wrsize, xmalloc(), and xstrdup().
Referenced by fsmSetup().
int cpioHeaderWrite | ( | FSM_t | fsm, |
struct stat * | st | ||
) |
Write cpio header.
fsm | file path and stat info |
st |
Definition at line 95 of file cpio.c.
References _cpio_debug, cpioCrcPhysicalHeader::checksum, CPIO_NEWC_MAGIC, CPIOERR_WRITE_FAILED, cpioCrcPhysicalHeader::devMajor, cpioCrcPhysicalHeader::devMinor, cpioCrcPhysicalHeader::filesize, FSM_DWRITE, FSM_PAD, fsmNext(), cpioCrcPhysicalHeader::gid, cpioCrcPhysicalHeader::inode, fsm_s::lpath, cpioCrcPhysicalHeader::magic, major, minor, cpioCrcPhysicalHeader::mode, cpioCrcPhysicalHeader::mtime, cpioCrcPhysicalHeader::namesize, cpioCrcPhysicalHeader::nlink, fsm_s::path, PHYS_HDR_SIZE, fsm_s::rdbuf, cpioCrcPhysicalHeader::rdevMajor, cpioCrcPhysicalHeader::rdevMinor, fsm_s::rdnb, S_ISLNK, SET_NUM_FIELD, cpioCrcPhysicalHeader::uid, and fsm_s::wrnb.
Referenced by fsmSetup().
int cpioTrailerWrite | ( | FSM_t | fsm | ) |
Write cpio trailer.
fsm | file path and stat info |
Definition at line 67 of file cpio.c.
References CPIO_NEWC_MAGIC, CPIO_TRAILER, FSM_DWRITE, FSM_PAD, fsmNext(), cpioCrcPhysicalHeader::magic, cpioCrcPhysicalHeader::namesize, cpioCrcPhysicalHeader::nlink, PHYS_HDR_SIZE, fsm_s::rdbuf, and fsm_s::rdnb.
Referenced by fsmSetup().