Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

PAYLOAD.


Files

file  cpio.c
 Handle cpio payloads within rpm packages.

file  cpio.h
 Structures used to handle cpio payloads within rpm packages.

file  install.c
file  rpmlib.h
file  uninstall.c

Compounds

struct  cpioCallbackInfo
struct  cpioCrcPhysicalHeader
struct  cpioFileMapping
struct  cpioHeader
struct  hardLink

Defines

#define CPIOERR_CHECK_ERRNO   0x00008000

Typedefs

typedef void (* cpioCallback )(struct cpioCallbackInfo *filespec, void *data)

Enumerations

enum  hardLinkType { HARDLINK_INSTALL = 1, HARDLINK_BUILD }
enum  cpioErrorReturns {
  CPIOERR_BAD_MAGIC = (2 ), CPIOERR_BAD_HEADER = (3 ), CPIOERR_OPEN_FAILED = (4 | 0x00008000 ), CPIOERR_CHMOD_FAILED = (5 | 0x00008000 ),
  CPIOERR_CHOWN_FAILED = (6 | 0x00008000 ), CPIOERR_WRITE_FAILED = (7 | 0x00008000 ), CPIOERR_UTIME_FAILED = (8 | 0x00008000 ), CPIOERR_UNLINK_FAILED = (9 | 0x00008000 ),
  CPIOERR_SYMLINK_FAILED = (11 | 0x00008000 ), CPIOERR_STAT_FAILED = (12 | 0x00008000 ), CPIOERR_MKDIR_FAILED = (13 | 0x00008000 ), CPIOERR_MKNOD_FAILED = (14 | 0x00008000 ),
  CPIOERR_MKFIFO_FAILED = (15 | 0x00008000 ), CPIOERR_LINK_FAILED = (16 | 0x00008000 ), CPIOERR_READLINK_FAILED = (17 | 0x00008000 ), CPIOERR_READ_FAILED = (18 | 0x00008000 ),
  CPIOERR_COPY_FAILED = (19 | 0x00008000 ), CPIOERR_HDR_SIZE = (20 ), CPIOERR_UNKNOWN_FILETYPE = (21 ), CPIOERR_MISSING_HARDLINK = (22 ),
  CPIOERR_MD5SUM_MISMATCH = (23 ), CPIOERR_INTERNAL = (24 )
}
enum  cpioMapFlags {
  CPIO_MAP_PATH = (1 << 0), CPIO_MAP_MODE = (1 << 1), CPIO_MAP_UID = (1 << 2), CPIO_MAP_GID = (1 << 3),
  CPIO_FOLLOW_SYMLINKS = (1 << 4), CPIO_MULTILIB = (1 << 31)
}

Functions

int cpioInstallArchive (FD_t cfd, const struct cpioFileMapping *mappings, int numMappings, cpioCallback cb, void *cbData, const char **failedFile)
int cpioBuildArchive (FD_t cfd, const struct cpioFileMapping *mappings, int numMappings, cpioCallback cb, void *cbData, unsigned int *archiveSize, const char **failedFile)
int cpioFileMapCmp (const void *a, const void *b)
const char* cpioStrerror (int rc)

Define Documentation

#define CPIOERR_CHECK_ERRNO   0x00008000
 

Note: CPIO_CHECK_ERRNO bit is set only if errno is valid. These have to be positive numbers or this setting the high bit stuff is a bad idea.

Definition at line 24 of file cpio.h.


Typedef Documentation

typedef void(* cpioCallback)(struct cpioCallbackInfo *filespec, void *data)
 

Definition at line 96 of file cpio.h.


Enumeration Type Documentation

enum cpioErrorReturns
 

Enumeration values:
CPIOERR_BAD_MAGIC  
CPIOERR_BAD_HEADER  
CPIOERR_OPEN_FAILED  
CPIOERR_CHMOD_FAILED  
CPIOERR_CHOWN_FAILED  
CPIOERR_WRITE_FAILED  
CPIOERR_UTIME_FAILED  
CPIOERR_UNLINK_FAILED  
CPIOERR_SYMLINK_FAILED  
CPIOERR_STAT_FAILED  
CPIOERR_MKDIR_FAILED  
CPIOERR_MKNOD_FAILED  
CPIOERR_MKFIFO_FAILED  
CPIOERR_LINK_FAILED  
CPIOERR_READLINK_FAILED  
CPIOERR_READ_FAILED  
CPIOERR_COPY_FAILED  
CPIOERR_HDR_SIZE  
CPIOERR_UNKNOWN_FILETYPE  
CPIOERR_MISSING_HARDLINK  
CPIOERR_MD5SUM_MISMATCH  
CPIOERR_INTERNAL  

Definition at line 28 of file cpio.h.

enum cpioMapFlags
 

Enumeration values:
CPIO_MAP_PATH  
CPIO_MAP_MODE  
CPIO_MAP_UID  
CPIO_MAP_GID  
CPIO_FOLLOW_SYMLINKS  
CPIO_MULTILIB  

Definition at line 56 of file cpio.h.

enum hardLinkType
 

Enumeration values:
HARDLINK_INSTALL  
HARDLINK_BUILD  

Definition at line 38 of file cpio.c.


Function Documentation

int cpioBuildArchive ( FD_t cfd,
const struct cpioFileMapping * mappings,
int numMappings,
cpioCallback cb,
void * cbData,
unsigned int * archiveSize,
const char ** failedFile )
 

The RPM internal equivalent of the command line "cpio -o".

Parameters:
cfd   file handle
mappings   archive info for building
numMappings   number of archive elements
cb   progress callback
cbData   progress callback data
Return values:
failedFile   file name (malloc'ed) that caused failure (if any)
Returns:
0 on success

Definition at line 1127 of file cpio.c.

Referenced by cpio_doio().

int cpioFileMapCmp ( const void * a,
const void * b )
 

Compare two cpio file map entries (qsort/bsearch). This is designed to be qsort/bsearch compatible.

Parameters:
a   1st map
b   2nd map
Returns:
result of comparison

Definition at line 280 of file cpio.c.

int cpioInstallArchive ( FD_t cfd,
const struct cpioFileMapping * mappings,
int numMappings,
cpioCallback cb,
void * cbData,
const char ** failedFile )
 

Todo:
Verify payload MD5 sum.

Definition at line 734 of file cpio.c.

Referenced by installArchive().

const char* cpioStrerror ( int rc )
 

Return formatted error message on payload handling failure.

Parameters:
error   code
Returns:
formatted error string

Definition at line 1244 of file cpio.c.

Referenced by cpioInstallArchive(), cpio_doio(), and installArchive().


Generated at Mon May 21 08:53:44 2001 for rpm by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001