rpm  5.4.10
Macros | Functions | Variables
poptIO.c File Reference

Popt tables for all rpmio-only executables. More...

#include "system.h"
#include <poptIO.h>
#include <rpmasn.h>
#include <rpmtpm.h>
#include <mongo.h>
#include <rpmaug.h>
#include <rpmbag.h>
#include <rpmbf.h>
#include <rpmcudf.h>
#include <rpmcvs.h>
#include <rpmficl.h>
#include <rpmgit.h>
#include <rpmhkp.h>
#include <rpmjs.h>
#include <rpmnix.h>
#include <rpmodbc.h>
#include <rpmperl.h>
#include <rpmpython.h>
#include <rpmruby.h>
#include <rpmsql.h>
#include <rpmsquirrel.h>
#include <rpmsvn.h>
#include <rpmtcl.h>
#include <rpmsm.h>
#include <rpmsp.h>
#include <rpmsx.h>
#include <set.h>
#include "debug.h"
Include dependency graph for poptIO.c:

Go to the source code of this file.

Macros

#define POPT_ARGFLAG_TOGGLE   0
 
#define POPT_SHOWVERSION   -999
 
#define POPT_UNDEFINE   -994
 
#define POPT_CRYPTO   -993
 

Functions

static void printVersion (FILE *fp)
 Display rpm version. More...
 
void rpmioConfigured (void)
 
static void rpmioAllArgCallback (poptContext con, enum poptCallbackReason reason, const struct poptOption *opt, const char *arg, const void *data)
 
poptContext rpmioFini (poptContext optCon)
 
static int checkfd (const char *devnull, int fdno, int flags)
 
poptContext rpmioInit (int argc, char *const argv[], struct poptOption *optionsTable)
 
static char * matchchar (char *p, char pl, char pr)
 Return text between pl and matching pr characters. More...
 
rpmioP rpmioPFree (rpmioP P)
 Destroy a rpmioP object. More...
 
rpmRC rpmioParse (rpmioP *Pptr, const char *str)
 Parse next command out of a string incrementally. More...
 

Variables

int _rpmsvn_debug
 
const char * __progname
 
int __debug = 0
 
int _ar_debug
 
int _av_debug
 
int _cpio_debug
 
int _ctx_debug
 
int _dav_debug
 
int _ftp_debug
 
int _fts_debug
 
int _ht_debug
 
int _html_debug
 
int _iosm_debug
 
int noLibio
 
int _pgp_debug
 
int _pgp_print
 
int _rpmio_debug
 
int _rpmiob_debug
 
int _rpmlua_debug
 
int _rpmsq_debug
 
int _rpmzq_debug
 
int _tar_debug
 
int _xar_debug
 
const char * rpmioPipeOutput = NULL
 
const char * rpmioRootDir = "/"
 
const char * rpmioEVR = VERSION
 
static int rpmioInitialized = -1
 
int _rpmio_popt_context_flags = 0
 
pgpHashAlgo rpmioDigestHashAlgo = (pgpHashAlgo) -1
 
struct poptOption rpmioDigestPoptTable []
 Digest options using popt. More...
 
int rpmioFtsOpts = 0
 
struct poptOption rpmioFtsPoptTable []
 
struct poptOption rpmioAllPoptTable []
 

Detailed Description

Popt tables for all rpmio-only executables.

Definition in file poptIO.c.

Macro Definition Documentation

§ POPT_ARGFLAG_TOGGLE

#define POPT_ARGFLAG_TOGGLE   0

Definition at line 68 of file poptIO.c.

Referenced by rpmsqlI().

§ POPT_CRYPTO

#define POPT_CRYPTO   -993

Definition at line 72 of file poptIO.c.

Referenced by rpmioAllArgCallback().

§ POPT_SHOWVERSION

#define POPT_SHOWVERSION   -999

Definition at line 70 of file poptIO.c.

Referenced by rpmioAllArgCallback().

§ POPT_UNDEFINE

#define POPT_UNDEFINE   -994

Definition at line 71 of file poptIO.c.

Referenced by rpmioAllArgCallback().

Function Documentation

§ checkfd()

static int checkfd ( const char *  devnull,
int  fdno,
int  flags 
)
inlinestatic

Definition at line 739 of file poptIO.c.

References errno.

Referenced by rpmioInit().

§ matchchar()

static char* matchchar ( char *  p,
char  pl,
char  pr 
)
static

Return text between pl and matching pr characters.

Parameters
pstart of text
plleft char, i.e. '[', '(', '{', etc.
prright char, i.e. ']', ')', '}', etc.
Returns
pointer to matching pr char in string (or NULL)

Definition at line 922 of file poptIO.c.

Referenced by rpmioParse().

§ printVersion()

static void printVersion ( FILE *  fp)
static

Display rpm version.

Definition at line 362 of file poptIO.c.

References _, and RPM_NAME.

Referenced by rpmioAllArgCallback().

§ rpmioAllArgCallback()

static void rpmioAllArgCallback ( poptContext  con,
enum poptCallbackReason  reason,
const struct poptOption *  opt,
const char *  arg,
const void *  data 
)
static

§ rpmioConfigured()

void rpmioConfigured ( void  )

Definition at line 369 of file poptIO.c.

References EXIT_FAILURE.

Referenced by rpmioAllArgCallback(), and rpmioInit().

§ rpmioFini()

poptContext rpmioFini ( poptContext  optCon)

Definition at line 719 of file poptIO.c.

References rpmCLIMacroContext, rpmFreeMacros(), and rpmioClean().

Referenced by main(), and rpmioAllArgCallback().

§ rpmioInit()

poptContext rpmioInit ( int  argc,
char *const  argv[],
struct poptOption *  optionsTable 
)

§ rpmioParse()

rpmRC rpmioParse ( rpmioP Pptr,
const char *  str 
)

Parse next command out of a string incrementally.

Parameters
*Pptrparser state
strstring to parse
Returns
RPMRC_OK on success

Definition at line 951 of file poptIO.c.

References _free(), rpmioP_s::ac, argvAdd(), argvFree(), rpmioP_s::av, matchchar(), rpmioP_s::next, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmioP_s::str, xcalloc(), and xstrdup().

§ rpmioPFree()

rpmioP rpmioPFree ( rpmioP  P)

Destroy a rpmioP object.

Parameters
Pparser state
Returns
NULL

Definition at line 941 of file poptIO.c.

References _free(), argvFree(), rpmioP_s::av, and rpmioP_s::str.

Variable Documentation

§ __debug

int __debug = 0

Definition at line 75 of file poptIO.c.

§ __progname

const char* __progname

Definition at line 65 of file poptIO.c.

§ _ar_debug

int _ar_debug

Definition at line 23 of file ar.c.

Referenced by arHeaderRead(), arHeaderWrite(), arRead(), arTrailerWrite(), and arWrite().

§ _av_debug

int _av_debug

Definition at line 183 of file rpmio.c.

§ _cpio_debug

int _cpio_debug

Definition at line 20 of file cpio.c.

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

§ _ctx_debug

int _ctx_debug

Definition at line 110 of file digest.c.

Referenced by ctxGetPool().

§ _dav_debug

int _dav_debug

Definition at line 193 of file rpmio.c.

§ _ftp_debug

int _ftp_debug

Definition at line 188 of file rpmio.c.

Referenced by ftpLstat(), ftpOpendir(), ftpReadlink(), and ftpStat().

§ _fts_debug

int _fts_debug

Definition at line 165 of file fts.c.

Referenced by dsort(), Fts_children(), Fts_close(), Fts_open(), Fts_read(), and Fts_set().

§ _ht_debug

int _ht_debug

Definition at line 13 of file rpmhash.c.

Referenced by htGetPool().

§ _html_debug

int _html_debug

Definition at line 1117 of file rpmdav.c.

§ _iosm_debug

int _iosm_debug

Definition at line 75 of file iosm.c.

Referenced by iosmSetup().

§ _pgp_debug

int _pgp_debug

Definition at line 29 of file rpmpgp.c.

§ _pgp_print

int _pgp_print

Definition at line 32 of file rpmpgp.c.

§ _rpmio_debug

int _rpmio_debug

§ _rpmio_popt_context_flags

int _rpmio_popt_context_flags = 0

Definition at line 144 of file poptIO.c.

§ _rpmiob_debug

int _rpmiob_debug

§ _rpmlua_debug

int _rpmlua_debug

Definition at line 58 of file rpmlua.c.

§ _rpmsq_debug

int _rpmsq_debug

Definition at line 278 of file rpmsq.c.

§ _rpmsvn_debug

int _rpmsvn_debug

§ _rpmzq_debug

int _rpmzq_debug

§ _tar_debug

int _tar_debug

Definition at line 21 of file tar.c.

§ _xar_debug

int _xar_debug

Definition at line 70 of file rpmxar.c.

§ noLibio

int noLibio

Definition at line 165 of file rpmio.c.

Referenced by Fclose(), Fdopen(), and ufdClose().

§ rpmioAllPoptTable

struct poptOption rpmioAllPoptTable[]

Definition at line 551 of file poptIO.c.

Referenced by rpmsqlI().

§ rpmioDigestHashAlgo

pgpHashAlgo rpmioDigestHashAlgo = (pgpHashAlgo) -1

Definition at line 146 of file poptIO.c.

Referenced by main(), rpmdcFiniFile(), and rpmrepoInitPopt().

§ rpmioDigestPoptTable

struct poptOption rpmioDigestPoptTable[]

Digest options using popt.

Definition at line 151 of file poptIO.c.

Referenced by rpmdcAlgo2Name(), rpmdcFiniFile(), rpmdcInitFile(), and rpmdcName2Algo().

§ rpmioEVR

const char* rpmioEVR = VERSION

Definition at line 129 of file poptIO.c.

§ rpmioFtsOpts

int rpmioFtsOpts = 0

§ rpmioFtsPoptTable

struct poptOption rpmioFtsPoptTable[]
Initial value:
= {
{ "comfollow", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_COMFOLLOW,
N_("FTS_COMFOLLOW: follow command line symlinks"), NULL },
{ "logical", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_LOGICAL,
N_("FTS_LOGICAL: logical walk"), NULL },
{ "nochdir", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_NOCHDIR,
N_("FTS_NOCHDIR: don't change directories"), NULL },
{ "nostat", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_NOSTAT,
N_("FTS_NOSTAT: don't get stat info"), NULL },
{ "physical", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_PHYSICAL,
N_("FTS_PHYSICAL: physical walk"), NULL },
{ "seedot", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_SEEDOT,
N_("FTS_SEEDOT: return dot and dot-dot"), NULL },
{ "xdev", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_XDEV,
N_("FTS_XDEV: don't cross devices"), NULL },
{ "whiteout", '\0', POPT_BIT_SET, &rpmioFtsOpts, FTS_WHITEOUT,
N_("FTS_WHITEOUT: return whiteout information"), NULL },
POPT_TABLEEND
}
#define FTS_XDEV
Definition: fts.h:93
#define N_(Text)
Definition: system.h:490
#define FTS_COMFOLLOW
Definition: fts.h:87
#define FTS_SEEDOT
Definition: fts.h:92
int rpmioFtsOpts
Definition: poptIO.c:526
#define FTS_NOCHDIR
Definition: fts.h:89
#define FTS_WHITEOUT
Definition: fts.h:94
#define FTS_PHYSICAL
Definition: fts.h:91
#define FTS_LOGICAL
Definition: fts.h:88
#define FTS_NOSTAT
Definition: fts.h:90

Definition at line 529 of file poptIO.c.

§ rpmioInitialized

int rpmioInitialized = -1
static

Definition at line 132 of file poptIO.c.

§ rpmioPipeOutput

const char* rpmioPipeOutput = NULL

Definition at line 123 of file poptIO.c.

Referenced by main().

§ rpmioRootDir

const char* rpmioRootDir = "/"

Definition at line 126 of file poptIO.c.

Referenced by main().