rpm 5.3.12
Data Structures | Defines | Typedefs | Functions | Variables
rpmio/ar.h File Reference

Structures used for ar(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  arHeader_s
 ar(1) archive header. More...

Defines

#define AR_MAGIC   "!<arch>\n"
#define AR_MARKER   "`\n"

Typedefs

typedef struct arHeader_sarHeader

Functions

int arHeaderRead (void *_iosm, struct stat *st)
 Read ar(1) header.
int arHeaderWrite (void *_iosm, struct stat *st)
 Write ar(1) header.
int arTrailerWrite (void *_iosm)
 Write ar(1) trailer.

Variables

int _ar_debug

Detailed Description

Structures used for ar(1) archives.

Definition in file ar.h.


Define Documentation

#define AR_MAGIC   "!<arch>\n"

Definition at line 14 of file ar.h.

Referenced by arHeaderRead(), and arHeaderWrite().

#define AR_MARKER   "`\n"

Definition at line 15 of file ar.h.

Referenced by arHeaderRead(), and arHeaderWrite().


Typedef Documentation

typedef struct arHeader_s* arHeader

Definition at line 11 of file ar.h.


Function Documentation

int arHeaderRead ( void *  _iosm,
struct stat *  st 
)

Read ar(1) header.

Return values:
_iosmfile path and stat info
st
Returns:
0 on success

Definition at line 92 of file ar.c.

References _ar_debug, _iosmNext, _IOSMRC, AR_MAGIC, AR_MARKER, arRead(), iosm_s::cfd, fdGetCpioPos(), IOSM_POS, IOSMERR_BAD_MAGIC, iosm_s::lmtab, iosm_s::lmtablen, iosm_s::lmtaboff, iosm_s::path, strntoul(), iosm_s::wrbuf, xisdigit(), and xstrdup().

Referenced by fsmSetup(), and iosmSetup().

int arHeaderWrite ( void *  _iosm,
struct stat *  st 
)

Write ar(1) header.

Return values:
_iosmfile path and stat info
Parameters:
st
Returns:
0 on success

Definition at line 235 of file ar.c.

References _ar_debug, _iosmNext, _IOSMRC, AR_MAGIC, AR_MARKER, arWrite(), iosm_s::cfd, fdGetCpioPos(), arHeader_s::filesize, arHeader_s::gid, IOSM_PAD, iosm_s::lmtab, iosm_s::lmtablen, iosm_s::lmtaboff, arHeader_s::marker, arHeader_s::mode, arHeader_s::mtime, arHeader_s::name, iosm_s::path, iosm_s::rdbuf, snprintf(), and arHeader_s::uid.

Referenced by fsmSetup(), and iosmSetup().

int arTrailerWrite ( void *  _iosm)

Write ar(1) trailer.

Return values:
_iosmfile path and stat info
Returns:
0 on success

Definition at line 309 of file ar.c.

References _ar_debug, _iosmNext, _IOSMRC, arWrite(), and IOSM_PAD.

Referenced by fsmSetup(), and iosmSetup().


Variable Documentation

int _ar_debug

Definition at line 23 of file ar.c.