rpm  5.4.10
Data Structures | Macros | Typedefs | Functions | Variables
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...
 

Macros

#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. More...
 
int arHeaderWrite (void *_iosm, struct stat *st)
 Write ar(1) header. More...
 
int arTrailerWrite (void *_iosm)
 Write ar(1) trailer. More...
 

Variables

int _ar_debug
 

Detailed Description

Structures used for ar(1) archives.

Definition in file ar.h.

Macro Definition Documentation

§ AR_MAGIC

#define AR_MAGIC   "!<arch>\n"

Definition at line 14 of file ar.h.

Referenced by arHeaderRead(), and arHeaderWrite().

§ AR_MARKER

#define AR_MARKER   "`\n"

Definition at line 15 of file ar.h.

Referenced by arHeaderRead(), and arHeaderWrite().

Typedef Documentation

§ arHeader

typedef struct arHeader_s* arHeader

Definition at line 11 of file ar.h.

Function Documentation

§ arHeaderRead()

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

§ arHeaderWrite()

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().

§ arTrailerWrite()

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

§ _ar_debug

int _ar_debug

Definition at line 23 of file ar.c.