lib/query.c File Reference

Display tag values from package metadata. More...

#include "system.h"
#include <rpmio.h>
#include <rpmtag.h>
#include <rpmcli.h>
#include "rpmdb.h"
#include "rpmfi.h"
#include "rpmgi.h"
#include "rpmts.h"
#include "manifest.h"
#include "misc.h"
#include "debug.h"

Include dependency graph for query.c:

Go to the source code of this file.

Defines

#define PATH_MAX   255
#define _RPMTAG_INTERNAL

Functions

static void printFileInfo (char *te, const char *name, unsigned int size, unsigned short mode, unsigned int mtime, unsigned short rdev, unsigned int nlink, const char *owner, const char *group, const char *linkto)
static const char * queryHeader (Header h, const char *qfmt)
static void flushBuffer (char **tp, char **tep, int nonewline)
int showQueryPackage (QVA_t qva, rpmts ts, Header h)
 Display results of package query.
static int rpmgiShowMatches (QVA_t qva, rpmts ts)
int rpmcliShowMatches (QVA_t qva, rpmts ts)
 Display query/verify information for each header in iterator.
static unsigned char nibble (char c)
 Convert hex to binary nibble.
int rpmQueryVerify (QVA_t qva, rpmts ts, const char *arg)
 Common query/verify source interface, called once for each CLI arg.
int rpmcliArgIter (rpmts ts, QVA_t qva, ARGV_t argv)
 Iterate over query/verify arg list.
int rpmcliQuery (rpmts ts, QVA_t qva, const char **argv)
 Display package information.


Detailed Description

Display tag values from package metadata.

Definition in file query.c.


Define Documentation

#define _RPMTAG_INTERNAL

Definition at line 15 of file query.c.

#define PATH_MAX   255

Definition at line 10 of file query.c.

Referenced by doFoo(), doLookup(), rpmdbURIPath(), and rpmQueryVerify().


Function Documentation

static void flushBuffer ( char **  tp,
char **  tep,
int  nonewline 
) [static]

Definition at line 150 of file query.c.

References rpmlog(), and RPMLOG_NOTICE.

Referenced by showQueryPackage().

static unsigned char nibble ( char  c  )  [inline, static]

Convert hex to binary nibble.

Parameters:
c hex character
Returns:
binary nibble

Definition at line 427 of file query.c.

Referenced by rpmQueryVerify().

static void printFileInfo ( char *  te,
const char *  name,
unsigned int  size,
unsigned short  mode,
unsigned int  mtime,
unsigned short  rdev,
unsigned int  nlink,
const char *  owner,
const char *  group,
const char *  linkto 
) [static]

Definition at line 34 of file query.c.

References _free(), alloca(), rpmPermsString(), and S_ISLNK.

Referenced by showQueryPackage().

static const char* queryHeader ( Header  h,
const char *  qfmt 
) [inline, static]

Definition at line 134 of file query.c.

References _, headerSprintf(), rpmHeaderFormats, rpmlog(), and RPMLOG_ERR.

Referenced by showQueryPackage().

static int rpmgiShowMatches ( QVA_t  qva,
rpmts  ts 
) [static]


Generated on Wed Nov 4 20:11:33 2009 for rpm by  doxygen 1.5.9