lib/rpmfi.h File Reference

Structure(s) used for file info tag sets. More...

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

Go to the source code of this file.

Variables

int _rpmfi_debug


Detailed Description

Structure(s) used for file info tag sets.

Definition in file rpmfi.h.


Define Documentation

#define rpmfiLink ( _fi,
_msg   )     XrpmfiLink(_fi, _msg, __FILE__, __LINE__)

#define rpmfiUnlink ( _fi,
_msg   )     XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__)

Definition at line 208 of file rpmfi.h.

Referenced by mapFreeIterator(), rpmalAdd(), rpmfiFree(), and verifyHeader().


Function Documentation

const char* rpmfiBN ( rpmfi  fi  ) 

Return current base name from file info set.

Parameters:
fi file info set
Returns:
current base name, NULL on invalid

Definition at line 109 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), rpmalAdd(), rpmfi_BN(), and skipFiles().

void rpmfiBuildFClasses ( Header  h,
const char ***  fclassp,
int *  fcp 
)

Retrieve file classes from header.

This function is used to retrieve file classes from the header.

Parameters:
h header
Return values:
*fclassp array of file classes
*fcp number of files

Definition at line 1566 of file rpmfi.c.

References _free(), rpmfiFC(), rpmfiFClass(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, stpcpy(), and xmalloc().

Referenced by fileclassTag().

void rpmfiBuildFContexts ( Header  h,
const char ***  fcontextp,
int *  fcp 
)

Retrieve file security contexts from header.

This function is used to retrieve file contexts from the header.

Parameters:
h header
Return values:
*fcontextp array of file contexts
*fcp number of files

Definition at line 1621 of file rpmfi.c.

References _free(), rpmfiFC(), rpmfiFContext(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, stpcpy(), and xmalloc().

Referenced by filecontextsTag().

void rpmfiBuildFDeps ( Header  h,
rpmTag  tagN,
const char ***  fdepsp,
int *  fcp 
)

Retrieve per-file dependencies from header.

This function is used to retrieve per-file dependencies from the header.

Parameters:
h header
tagN RPMTAG_PROVIDENAME | RPMTAG_REQUIRENAME
Return values:
*fdepsp array of file dependencies
*fcp number of files

Definition at line 1827 of file rpmfi.c.

References _free(), rpmdsDNEVR(), rpmdsFree(), rpmdsNew(), rpmdsNext(), rpmdsSetIx(), rpmfiFC(), rpmfiFDepends(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, stpcpy(), and xmalloc().

Referenced by fileprovideTag(), and filerequireTag().

void rpmfiBuildFSContexts ( Header  h,
const char ***  fcontextp,
int *  fcp 
)

Retrieve file security contexts from file system.

This function is used to retrieve file contexts from the file system.

Parameters:
h header
Return values:
*fcontextp array of file contexts
*fcp number of files

Definition at line 1676 of file rpmfi.c.

References _free(), alloca(), freecon, lgetfilecon, rpmfiFC(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, xmalloc(), and xrealloc().

Referenced by fscontextsTag().

void rpmfiBuildREContexts ( Header  h,
const char ***  fcontextp,
int *  fcp 
)

Retrieve file security contexts from policy RE's.

This function is used to retrieve file contexts from policy RE's.

Parameters:
h header
Return values:
*fcontextp array of file contexts
*fcp number of files

Definition at line 1747 of file rpmfi.c.

References _free(), alloca(), freecon, matchpathcon, matchpathcon_init, rpmfiFC(), rpmfiFMode(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), rpmGetPath(), RPMTAG_BASENAMES, xmalloc(), and xrealloc().

Referenced by recontextsTag().

uint_32 rpmfiColor ( rpmfi  fi  ) 

Return union of all file color bits from file info set.

Parameters:
fi file info set
Returns:
current color

Definition at line 325 of file rpmfi.c.

int rpmfiCompare ( const rpmfi  afi,
const rpmfi  bfi 
)

Return file info comparison.

Parameters:
afi 1st file info
bfi 2nd file info
Returns:
0 if identical

Definition at line 571 of file rpmfi.c.

References LINK, REG, rpmfiDigest(), rpmfiFLink(), rpmfiFMode(), and whatis().

Referenced by handleInstInstalledFiles(), and handleOverlappedFiles().

int rpmfiDC ( rpmfi  fi  ) 

Return directory count from file info set.

Parameters:
fi file info set
Returns:
current directory count

Definition at line 63 of file rpmfi.c.

Referenced by rpmalAdd(), rpmalDel(), rpmfi_DC(), and skipFiles().

fileAction rpmfiDecideFate ( const rpmfi  ofi,
rpmfi  nfi,
int  skipMissing 
)

Return file disposition.

Parameters:
ofi old file info
nfi new file info
skipMissing OK to skip missing files?
Returns:
file dispostion

Definition at line 607 of file rpmfi.c.

References D_, dodigest(), FA_ALTNAME, FA_CREATE, FA_SAVE, FA_SKIP, LINK, REG, rpmfiDigest(), rpmfiFFlags(), rpmfiFLink(), rpmfiFMode(), rpmfiFN(), RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, RPMFILE_SPARSE, RPMMESS_DEBUG, rpmMessage, save, whatis(), and XDIR.

Referenced by handleInstInstalledFiles().

const unsigned char* rpmfiDigest ( rpmfi  fi,
int *  algop,
size_t *  lenp 
)

Return current file (binary) digest from file info set.

Parameters:
fi file info set
Return values:
*algop digest algorithm
*lenp digest length (in bytes)
Returns:
current file digest, NULL on invalid

Definition at line 254 of file rpmfi.c.

Referenced by handleOverlappedFiles(), rpmfi_iternext(), rpmfi_MD5(), rpmfiCompare(), rpmfiDecideFate(), rpmVerifyFile(), and showQueryPackage().

const char* rpmfiDN ( rpmfi  fi  ) 

Return current directory name from file info set.

Parameters:
fi file info set
Returns:
current directory, NULL on invalid

Definition at line 122 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), rpmalAdd(), rpmalDel(), rpmfi_DN(), and skipFiles().

int rpmfiDX ( rpmfi  fi  ) 

Return current directory index from file info set.

Parameters:
fi file info set
Returns:
current directory index

Definition at line 93 of file rpmfi.c.

Referenced by rpmalAdd(), rpmfi_DX(), and skipFiles().

int rpmfiFC ( rpmfi  fi  ) 

const char* rpmfiFClass ( rpmfi  fi  ) 

Return current file class from file info set.

Parameters:
fi file info set
Returns:
current file class, 0 on invalid

Definition at line 349 of file rpmfi.c.

Referenced by rpmfi_FClass(), and rpmfiBuildFClasses().

uint_32 rpmfiFColor ( rpmfi  fi  ) 

Return current file color bits from file info set.

Parameters:
fi file info set
Returns:
current file color

Definition at line 335 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmalAdd(), rpmfi_FColor(), rpmteColorDS(), and skipFiles().

const char* rpmfiFContext ( rpmfi  fi  ) 

Return current file security context from file info set.

Parameters:
fi file info set
Returns:
current file context, 0 on invalid

Definition at line 364 of file rpmfi.c.

Referenced by rpmfiBuildFContexts().

int_32 rpmfiFDepends ( rpmfi  fi,
const uint_32 **  fddictp 
)

Return current file depends dictionary from file info set.

Parameters:
fi file info set
Return values:
*fddictp file depends dictionary array (or NULL)
Returns:
no. of file depends entries, 0 on invalid

Definition at line 377 of file rpmfi.c.

Referenced by rpmfiBuildFDeps(), and rpmteColorDS().

uint_32 rpmfiFFlags ( rpmfi  fi  ) 

Return current file flags from file info set.

Parameters:
fi file info set
Returns:
current file flags, 0 on invalid

Definition at line 157 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FFlags(), rpmfi_iternext(), rpmfiDecideFate(), rpmtsRun(), rpmVerifyFile(), showQueryPackage(), skipFiles(), and verifyHeader().

const char* rpmfiFGroup ( rpmfi  fi  ) 

Return current file group from file info set.

Parameters:
fi file info set
Returns:
current file group, NULL on invalid

Definition at line 449 of file rpmfi.c.

Referenced by rpmfi_FGroup(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

int_32 rpmfiFInode ( rpmfi  fi  ) 

Return current file inode from file info set.

Parameters:
fi file info set
Returns:
current file inode, 0 on invalid

Definition at line 312 of file rpmfi.c.

Referenced by rpmfi_iternext().

const char* rpmfiFLink ( rpmfi  fi  ) 

Return current file linkto (i.e.

symlink(2) target) from file info set.

Parameters:
fi file info set
Returns:
current file linkto, NULL on invalid

Definition at line 273 of file rpmfi.c.

Referenced by rpmfi_FLink(), rpmfiCompare(), rpmfiDecideFate(), rpmVerifyFile(), and showQueryPackage().

int_16 rpmfiFMode ( rpmfi  fi  ) 

Return current file mode from file info set.

Parameters:
fi file info set
Returns:
current file mode, 0 on invalid

Definition at line 213 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FMode(), rpmfi_iternext(), rpmfiBuildREContexts(), rpmfiCompare(), rpmfiDecideFate(), rpmVerifyFile(), showQueryPackage(), and skipFiles().

int_32 rpmfiFMtime ( rpmfi  fi  ) 

Return current file modify time from file info set.

Parameters:
fi file info set
Returns:
current file modify time, 0 on invalid

Definition at line 422 of file rpmfi.c.

Referenced by rpmfi_FMtime(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

const char* rpmfiFN ( rpmfi  fi  ) 

int_32 rpmfiFNlink ( rpmfi  fi  ) 

Return (calculated) current file nlink count from file info set.

Parameters:
fi file info set
Returns:
current file nlink count, 0 on invalid

Definition at line 400 of file rpmfi.c.

Referenced by rpmfi_iternext(), and showQueryPackage().

int_16 rpmfiFRdev ( rpmfi  fi  ) 

Return current file rdev from file info set.

Parameters:
fi file info set
Returns:
current file rdev, 0 on invalid

Definition at line 299 of file rpmfi.c.

Referenced by rpmfi_FRdev(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

rpmfi rpmfiFree ( rpmfi  fi  ) 

int_32 rpmfiFSize ( rpmfi  fi  ) 

Return current file size from file info set.

Parameters:
fi file info set
Returns:
current file size, 0 on invalid

Definition at line 286 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfi_FSize(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

rpmfileState rpmfiFState ( rpmfi  fi  ) 

Return current file state from file info set.

Parameters:
fi file info set
Returns:
current file state, 0 on invalid

Definition at line 226 of file rpmfi.c.

References RPMFILE_STATE_MISSING.

Referenced by handleOverlappedFiles(), rpmfi_FState(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

const char* rpmfiFUser ( rpmfi  fi  ) 

Return current file owner from file info set.

Parameters:
fi file info set
Returns:
current file owner, NULL on invalid

Definition at line 435 of file rpmfi.c.

Referenced by rpmfi_FUser(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

int rpmfiFX ( rpmfi  fi  ) 

Return current file index from file info set.

Parameters:
fi file info set
Returns:
current file index

Definition at line 74 of file rpmfi.c.

Referenced by rpmfi_FX().

rpmfi rpmfiInit ( rpmfi  fi,
int  fx 
)

rpmfi rpmfiInitD ( rpmfi  fi,
int  dx 
)

Initialize directory iterator index.

Parameters:
fi file info set
dx directory iterator index
Returns:
file info set, NULL if dx is out of range

Definition at line 521 of file rpmfi.c.

Referenced by skipFiles().

rpmfi rpmfiLink ( rpmfi  fi,
const char *  msg 
)

Reference a file info set instance.

Parameters:
fi file info set
msg 
Returns:
new file info set reference

rpmfi rpmfiNew ( const rpmts  ts,
Header  h,
rpmTag  tagN,
int  flags 
)

Create and load a file info set.

Parameters:
ts transaction set (NULL skips path relocation)
h header
tagN RPMTAG_BASENAMES
flags scareMem(0x1), nofilter(0x2)
Returns:
new file info set

Definition at line 1281 of file rpmfi.c.

References _fdupe, _fdupestring, _free(), _rpmfi_debug, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, FA_UNKNOWN, headerAddEntry(), headerFree(), headerFreeData(), headerGetEntry(), headerGetEntryMinMemory(), headerIsEntry(), headerLink(), headerModifyEntry(), headerRemoveEntry(), headerSprintf(), newFSM(), rpmRelocation_s::newPath, nibble(), PGPHASHALGO_CRC32, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_SHA1, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, relocateFileList(), rpmfiLink, rpmGetPath(), rpmHeaderFormats, RPMTAG_ARCHIVESIZE, RPMTAG_BASENAMES, RPMTAG_CLASSDICT, RPMTAG_DEPENDSDICT, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_FILECLASS, RPMTAG_FILECOLORS, RPMTAG_FILECONTEXTS, RPMTAG_FILEDEPENDSN, RPMTAG_FILEDEPENDSX, RPMTAG_FILEDIGESTALGOS, RPMTAG_FILEDIGESTS, RPMTAG_FILEFLAGS, RPMTAG_FILEGROUPNAME, RPMTAG_FILEINODES, RPMTAG_FILELANGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMODES, RPMTAG_FILEMTIMES, RPMTAG_FILERDEVS, RPMTAG_FILESIZES, RPMTAG_FILESTATES, RPMTAG_FILEUSERNAME, RPMTAG_FILEVERIFYFLAGS, RPMTAG_ORIGBASENAMES, RPMTAG_POSTTRANS, RPMTAG_POSTTRANSPROG, RPMTAG_PRETRANS, RPMTAG_PRETRANSPROG, RPMTAG_REMOVETID, RPMTAG_SOURCERPM, rpmTagTable, rpmteType(), rpmtsRelocateElement(), TR_ADDED, xcalloc(), xmalloc(), xrealloc(), and xstrdup().

Referenced by addTE(), genCpioListAndHeader(), handleInstInstalledFiles(), hdr_fiFromHeader(), rpmfi_init(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmInstallSourcePackage(), rpmtsAddAvailableElement(), rpmtsRun(), showQueryPackage(), and showVerifyPackage().

int rpmfiNext ( rpmfi  fi  ) 

int rpmfiNextD ( rpmfi  fi  ) 

Return next directory iterator index.

Parameters:
fi file info set
Returns:
directory iterator index, -1 on termination

Definition at line 501 of file rpmfi.c.

References _rpmfi_debug.

Referenced by skipFiles().

int rpmfiSetDX ( rpmfi  fi,
int  dx 
)

Set current directory index in file info set.

Parameters:
fi file info set
dx new directory index
Returns:
current directory index

Definition at line 98 of file rpmfi.c.

Referenced by rpmalAdd(), and rpmalDel().

uint_32 rpmfiSetFFlags ( rpmfi  fi,
uint_32  FFlags 
)

Set current file flags in file info set.

Parameters:
fi file info set
FFlags new file flags
Returns:
previous file flags, 0 on invalid

Definition at line 170 of file rpmfi.c.

Referenced by rpmtsRun().

rpmfileState rpmfiSetFState ( rpmfi  fi,
rpmfileState  fstate 
)

Set current file state in file info set.

Parameters:
fi file info set
fstate new file state
Returns:
previous file state, 0 on invalid

Definition at line 239 of file rpmfi.c.

int rpmfiSetFX ( rpmfi  fi,
int  fx 
)

Set current file index in file info set.

Parameters:
fi file info set
fx new file index
Returns:
current file index

Definition at line 79 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), and rpmfi_subscript().

uint_32 rpmfiSetVFlags ( rpmfi  fi,
uint_32  VFlags 
)

Set current file verify flags in file info set.

Parameters:
fi file info set
VFlags new file verify flags
Returns:
previous file verify flags, 0 on invalid

Definition at line 198 of file rpmfi.c.

const char* rpmfiTypeString ( rpmfi  fi  ) 

Return formatted string representation of package disposition.

Parameters:
fi file info set
Returns:
formatted string

Definition at line 704 of file rpmfi.c.

References rpmteType(), TR_ADDED, and TR_REMOVED.

Referenced by fsmStage().

rpmfi rpmfiUnlink ( rpmfi  fi,
const char *  msg 
)

Unreference a file info set instance.

Parameters:
fi file info set
msg 
Returns:
NULL always

uint_32 rpmfiVFlags ( rpmfi  fi  ) 

Return current file verify flags from file info set.

Parameters:
fi file info set
Returns:
current file verify flags, 0 on invalid

Definition at line 185 of file rpmfi.c.

Referenced by rpmfi_iternext(), rpmfi_VFlags(), and rpmVerifyFile().

fileTypes whatis ( uint_16  mode  ) 

Return file type from mode_t.

Parameters:
mode file mode bits (from header)
Returns:
file type

Definition at line 557 of file rpmfi.c.

References BDEV, CDEV, LINK, PIPE, REG, S_ISLNK, S_ISSOCK, SOCK, and XDIR.

Referenced by relocateFileList(), rpmfiCompare(), rpmfiDecideFate(), and skipFiles().

rpmfi XrpmfiLink ( rpmfi  fi,
const char *  msg,
const char *  fn,
unsigned  ln 
)

Todo:
Remove debugging entry from the ABI.
Parameters:
fi file info set
msg 
fn 
ln 
Returns:
NULL always

Definition at line 47 of file rpmfi.c.

References _rpmfi_debug.

rpmfi XrpmfiUnlink ( rpmfi  fi,
const char *  msg,
const char *  fn,
unsigned  ln 
)

Todo:
Remove debugging entry from the ABI.
Parameters:
fi file info set
msg 
fn 
ln 
Returns:
NULL always

Definition at line 36 of file rpmfi.c.

References _rpmfi_debug.


Variable Documentation

Definition at line 34 of file rpmfi.c.


Generated on Fri Jun 19 18:49:24 2009 for rpm by  doxygen 1.5.7.1