rpmdb/db3.c File Reference

#include "system.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include <rpmurl.h>
#include <rpmdb.h>
#include "debug.h"

Include dependency graph for db3.c:

Go to the source code of this file.

Data Structures

struct  dbiHStats_s
 Hash database statistics. More...
struct  dbiBStats_s
 B-tree database statistics. More...

Defines

#define _RPMDB_INTERNAL
#define DB_CLIENT   DB_RPCCLIENT

Functions

static int cvtdberr (dbiIndex dbi, const char *msg, int error, int printit)
static const char * mapTagName (int value)
 Return (possibly renamed) tagName.
static int db_fini (dbiIndex dbi, const char *dbhome, const char *dbfile, const char *dbsubfile)
static int db3_fsync_disable (int fd)
static int db_init (dbiIndex dbi, const char *dbhome, const char *dbfile, const char *dbsubfile, DB_ENV **dbenvp)
static int db3sync (dbiIndex dbi, unsigned int flags)
static int db3cdup (dbiIndex dbi, DBC *dbcursor, DBC **dbcp, unsigned int flags)
static int db3cclose (dbiIndex dbi, DBC *dbcursor, unsigned int flags)
static int db3copen (dbiIndex dbi, DB_TXN *txnid, DBC **dbcp, unsigned int dbiflags)
static int db3cput (dbiIndex dbi, DBC *dbcursor, DBT *key, DBT *data, unsigned int flags)
static int db3cdel (dbiIndex dbi, DBC *dbcursor, DBT *key, DBT *data, unsigned int flags)
static int db3cget (dbiIndex dbi, DBC *dbcursor, DBT *key, DBT *data, unsigned int flags)
static int db3cpget (dbiIndex dbi, DBC *dbcursor, DBT *key, DBT *pkey, DBT *data, unsigned int flags)
static int db3ccount (dbiIndex dbi, DBC *dbcursor, unsigned int *countp, unsigned int flags)
static int db3byteswapped (dbiIndex dbi)
static int db3stat (dbiIndex dbi, unsigned int flags)
static int db3associate (dbiIndex dbi, dbiIndex dbisecondary, int(*callback)(DB *, const DBT *, const DBT *, DBT *), unsigned int flags)
static int db3join (dbiIndex dbi, DBC **curslist, DBC **dbcp, unsigned int flags)
static int db3close (dbiIndex dbi, unsigned int flags)
static int db3open (rpmdb rpmdb, rpmTag rpmtag, dbiIndex *dbip)

Variables

static int _debug = 1
_dbiVec db3vec


Detailed Description

Definition in file db3.c.


Define Documentation

#define _RPMDB_INTERNAL

Definition at line 19 of file db3.c.

#define DB_CLIENT   DB_RPCCLIENT

Definition at line 25 of file db3.c.

Referenced by db3open(), and db_init().


Function Documentation

static int cvtdberr ( dbiIndex  dbi,
const char *  msg,
int  error,
int  printit 
) [static]

Definition at line 153 of file db3.c.

References _, RPMERR_DBERR, and rpmError.

Referenced by db3associate(), db3cclose(), db3ccount(), db3cdel(), db3cdup(), db3cget(), db3close(), db3copen(), db3cpget(), db3cput(), db3join(), db3open(), db3stat(), db3sync(), db_fini(), and db_init().

static int db3_fsync_disable ( int  fd  )  [static]

Definition at line 236 of file db3.c.

Referenced by db_init().

static int db3associate ( dbiIndex  dbi,
dbiIndex  dbisecondary,
int(*)(DB *, const DBT *, const DBT *, DBT *)  callback,
unsigned int  flags 
) [static]

Definition at line 871 of file db3.c.

References _debug, and cvtdberr().

static int db3byteswapped ( dbiIndex  dbi  )  [static]

Definition at line 818 of file db3.c.

static int db3cclose ( dbiIndex  dbi,
DBC *  dbcursor,
unsigned int  flags 
) [static]

Definition at line 648 of file db3.c.

References _debug, and cvtdberr().

Referenced by db3copen().

static int db3ccount ( dbiIndex  dbi,
DBC *  dbcursor,
unsigned int *  countp,
unsigned int  flags 
) [static]

Definition at line 798 of file db3.c.

References _debug, and cvtdberr().

static int db3cdel ( dbiIndex  dbi,
DBC *  dbcursor,
DBT *  key,
DBT *  data,
unsigned int  flags 
) [static]

Definition at line 715 of file db3.c.

References _debug, and cvtdberr().

static int db3cdup ( dbiIndex  dbi,
DBC *  dbcursor,
DBC **  dbcp,
unsigned int  flags 
) [static]

Definition at line 630 of file db3.c.

References _debug, and cvtdberr().

static int db3cget ( dbiIndex  dbi,
DBC *  dbcursor,
DBT *  key,
DBT *  data,
unsigned int  flags 
) [static]

Definition at line 747 of file db3.c.

References _debug, and cvtdberr().

static int db3close ( dbiIndex  dbi,
unsigned int  flags 
) [static]

Definition at line 916 of file db3.c.

References _debug, _free(), cvtdberr(), D_, db3Free(), db_fini(), mapTagName(), rpmGenPath(), rpmGetPath(), RPMMESS_DEBUG, rpmMessage, and urlPath().

Referenced by db3open().

static int db3copen ( dbiIndex  dbi,
DB_TXN *  txnid,
DBC **  dbcp,
unsigned int  dbiflags 
) [static]

Definition at line 664 of file db3.c.

References _debug, cvtdberr(), and db3cclose().

static int db3cpget ( dbiIndex  dbi,
DBC *  dbcursor,
DBT *  key,
DBT *  pkey,
DBT *  data,
unsigned int  flags 
) [static]

Definition at line 776 of file db3.c.

References _debug, and cvtdberr().

static int db3cput ( dbiIndex  dbi,
DBC *  dbcursor,
DBT *  key,
DBT *  data,
unsigned int  flags 
) [static]

Definition at line 694 of file db3.c.

References _debug, and cvtdberr().

static int db3join ( dbiIndex  dbi,
DBC **  curslist,
DBC **  dbcp,
unsigned int  flags 
) [static]

Definition at line 898 of file db3.c.

References _debug, and cvtdberr().

static int db3open ( rpmdb  rpmdb,
rpmTag  rpmtag,
dbiIndex dbip 
) [static]

Definition at line 1069 of file db3.c.

References _, _debug, _free(), alloca(), cvtdberr(), D_, db3close(), db3New(), DB_CLIENT, db_init(), errno, F_OK, mapTagName(), prDbiOpenFlags(), rpmCleanPath(), rpmdbLink, rpmdbVerifyAllDBI(), RPMERR_DBERR, RPMERR_FLOCK, rpmError, rpmGenPath(), rpmGetPath(), rpmioMkpath(), RPMMESS_DEBUG, rpmMessage, RPMWARN_FLOCK, Stat(), stpcpy(), Unlink(), urlPath(), and W_OK.

static int db3stat ( dbiIndex  dbi,
unsigned int  flags 
) [static]

Definition at line 838 of file db3.c.

References _debug, _free(), and cvtdberr().

static int db3sync ( dbiIndex  dbi,
unsigned int  flags 
) [static]

Definition at line 610 of file db3.c.

References _debug, and cvtdberr().

static int db_fini ( dbiIndex  dbi,
const char *  dbhome,
const char *  dbfile,
const char *  dbsubfile 
) [static]

Definition at line 192 of file db3.c.

References _debug, cvtdberr(), D_, RPMMESS_DEBUG, and rpmMessage.

Referenced by db3close().

static int db_init ( dbiIndex  dbi,
const char *  dbhome,
const char *  dbfile,
const char *  dbsubfile,
DB_ENV **  dbenvp 
) [static]

Definition at line 320 of file db3.c.

References _debug, _free(), cvtdberr(), D_, db3_fsync_disable(), DB_CLIENT, prDbiOpenFlags(), rpmGenPath(), RPMMESS_DEBUG, and rpmMessage.

Referenced by db3open().

static const char* mapTagName ( int  value  )  [static]

Return (possibly renamed) tagName.

Handles Filedigests -> Filemd5s renaming.

Parameters:
value tag value
Returns:
tag string

Definition at line 179 of file db3.c.

References tagName().

Referenced by db3close(), and db3open().


Variable Documentation

int _debug = 1 [static]

Definition at line 7 of file db3.c.


Generated on Fri Aug 31 10:38:42 2007 for rpm by  doxygen 1.5.1