rpm  5.4.10
Data Structures | Macros | Typedefs | Functions | Variables
cpio.h File Reference

Structures used for cpio(1) archives. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cpioCrcPhysicalHeader_s
 Cpio archive header information. More...

Macros

#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 struct
cpioCrcPhysicalHeader_s
cpioHeader

Functions

int cpioHeaderRead (void *_iosm, struct stat *st)
 Read cpio header.
int cpioHeaderWrite (void *_iosm, struct stat *st)
 Write cpio header.
int cpioTrailerWrite (void *_iosm)
 Write cpio trailer.

Variables

int _cpio_debug

Detailed Description

Structures used for cpio(1) archives.

Definition in file cpio.h.

Macro Definition Documentation

#define CPIO_CRC_MAGIC   "070702"

Definition at line 15 of file cpio.h.

Referenced by cpioHeaderRead().

#define CPIO_NEWC_MAGIC   "070701"

Definition at line 14 of file cpio.h.

Referenced by cpioHeaderRead(), cpioHeaderWrite(), and cpioTrailerWrite().

#define CPIO_TRAILER   "TRAILER!!!"

Definition at line 16 of file cpio.h.

Referenced by cpioTrailerWrite(), and iosmStage().

#define PHYS_HDR_SIZE   110 /* Don't depend on sizeof(struct) */

Definition at line 18 of file cpio.h.

Referenced by cpioHeaderRead(), cpioHeaderWrite(), and cpioTrailerWrite().

Typedef Documentation

Definition at line 11 of file cpio.h.

Function Documentation

int cpioHeaderRead ( void *  _iosm,
struct stat *  st 
)
int cpioHeaderWrite ( void *  _iosm,
struct stat *  st 
)
int cpioTrailerWrite ( void *  _iosm)

Write cpio trailer.

Return values
_iosmfile path and stat info
Returns
0 on success

Definition at line 280 of file cpio.c.

References _cpio_debug, _iosmNext, _IOSMRC, CPIO_NEWC_MAGIC, CPIO_TRAILER, cpioWrite(), IOSM_PAD, cpioCrcPhysicalHeader_s::magic, cpioCrcPhysicalHeader_s::namesize, cpioCrcPhysicalHeader_s::nlink, PHYS_HDR_SIZE, and iosm_s::rdbuf.

Referenced by fsmSetup(), and iosmSetup().

Variable Documentation

int _cpio_debug

Definition at line 20 of file cpio.c.