rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Typedefs | Functions | Variables
rpmio.h File Reference
RPMIO.
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <dirent.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <rpmiotypes.h>`
`#include <rpmzlog.h>`
Include dependency graph for rpmio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | FDIO_s

## Typedefs
typedef struct _FD_s * | FD_t
typedef struct FDIO_s * | FDIO_t
typedef off_t | _libio_off_t
| Hide libio API lossage. More...
typedef off_t | _libio_pos_t
RPMIO Vectors.
typedef ssize_t(* | fdio_read_function_t )(void *cookie, char *buf, size_t nbytes)
typedef ssize_t(* | fdio_write_function_t )(void *cookie, const char *buf, size_t nbytes)
typedef int(* | fdio_seek_function_t )(void *cookie, _libio_pos_t pos, int whence)
typedef int(* | fdio_close_function_t )(void *cookie)
typedef FD_t(* | fdio_fopen_function_t )(const char *path, const char *fmode)
typedef FD_t(* | fdio_fdopen_function_t )(void *cookie, const char *fmode)
typedef int(* | fdio_flush_function_t )(void *cookie)

## Functions
void | rpmioClean (void)
| Free all memory allocated by rpmio usage. More...
rpmioPool | rpmioFreePool (rpmioPool pool)
| Reclaim memory pool items. More...
rpmioPool | rpmioNewPool (const char *name, size_t size, int limit, int flags, const char *(*dbg)(void *item), void(*init)(void *item), void(*fini)(void *item))
| Create a memory pool. More...
rpmioItem | rpmioUnlinkPoolItem (rpmioItem item, const char *msg, const char *fn, unsigned ln)
| Decrement a pool item refcount. More...
rpmioItem | rpmioLinkPoolItem (rpmioItem item, const char *msg, const char *fn, unsigned ln)
| Increment a pool item refcount. More...
void * | rpmioFreePoolItem (rpmioItem item, const char *msg, const char *fn, unsigned ln)
| Free a pool item. More...
rpmioItem | rpmioGetPool (rpmioPool pool, size_t size)
| Get unused item from pool, or alloc a new item. More...
rpmioItem | rpmioPutPool (rpmioItem item)
| Put unused item into pool (or free). More...
RPMIO Interface.
const char * | Fstrerror (FD_t fd)
| strerror(3) clone. More...
size_t | Fread (void *buf, size_t size, size_t nmemb, FD_t fd)
| fread(3) clone. More...
size_t | Fwrite (const void *buf, size_t size, size_t nmemb, FD_t fd)
| fwrite(3) clone. More...
int | Fseek (FD_t fd, _libio_off_t offset, int whence)
| fseek(3) clone. More...
int | Fclose (FD_t fd)
| fclose(3) clone. More...
FD_t | Fdopen (FD_t ofd, const char *fmode)
FD_t | Fopen (const char *path, const char *fmode)
| fopen(3) clone. More...
int | Fflush (FD_t fd)
| fflush(3) clone. More...
int | Ferror (FD_t fd)
| ferror(3) clone. More...
int | Fileno (FD_t fd)
| fileno(3) clone. More...
int | Fcntl (FD_t fd, int op, void *lip)
| fcntl(2) clone. More...

## Variables
rpmioPool | _fdPool

## RPMRPC Interface.
const char * | _chroot_prefix
int | Mkdir (const char *path, mode_t mode)
| mkdir(2) clone. More...
int | Chdir (const char *path)
| chdir(2) clone. More...
int | Rmdir (const char *path)
| rmdir(2) clone. More...
int | Chroot (const char *path)
| chroot(2) clone. More...
int | Open (const char *path, int flags, mode_t mode)
| open(2) clone. More...
int | Rename (const char *oldpath, const char *newpath)
| rename(2) clone. More...
int | Link (const char *oldpath, const char *newpath)
| link(2) clone. More...
int | Unlink (const char *path)
| unlink(2) clone. More...
int | Stat (const char *path, struct stat *st)
| stat(2) clone. More...
int | Lstat (const char *path, struct stat *st)
| lstat(2) clone. More...
int | Fstat (FD_t fd, struct stat *st)
| fstat(2) clone. More...
int | Chown (const char *path, uid_t owner, gid_t group)
| chown(2) clone. More...
int | Fchown (FD_t fd, uid_t owner, gid_t group)
| fchown(2) clone. More...
int | Lchown (const char *path, uid_t owner, gid_t group)
| lchown(2) clone. More...
int | Chmod (const char *path, mode_t mode)
| chmod(2) clone. More...
int | Fchmod (FD_t fd, mode_t mode)
| fchmod(2) clone. More...
int | Mkfifo (const char *path, mode_t mode)
| mkfifo(3) clone. More...
int | Mknod (const char *path, mode_t mode, dev_t dev)
| mknod(3) clone. More...
int | Utime (const char *path, const struct utimbuf *buf)
int | Utimes (const char *path, const struct timeval *times)
| utimes(2) clone. More...
int | Symlink (const char *oldpath, const char *newpath)
| symlink(3) clone. More...
int | Readlink (const char *path, char *buf, size_t bufsiz)
| readlink(2) clone. More...
int | Access (const char *path, int amode)
| access(2) clone. More...
int | Glob_pattern_p (const char *pattern, int quote)
| glob_pattern_p(3) clone. More...
int | Glob_error (const char *epath, int eerrno)
| glob_error(3) clone. More...
int | Glob (const char *pattern, int flags, int errfunc(const char *epath, int eerrno), void *_pglob)
| glob(3) clone. More...
void | Globfree (void *_pglob)
| globfree(3) clone. More...
DIR * | Opendir (const char *path)
| opendir(3) clone. More...
struct dirent * | Readdir (DIR *dir)
| readdir(3) clone. More...
int | Closedir (DIR *dir)
| closedir(3) clone. More...
char * | Realpath (const char *path, char *resolved_path)
| realpath(3) clone. More...
off_t | Lseek (int fdno, off_t offset, int whence)
| lseek(2) clone. More...

## RPMIO Utilities.
#define | fdRead(_fd, _buf, _count) fdio->read((_fd), (_buf), (_count))
#define | fdWrite(_fd, _buf, _count) fdio->write((_fd), (_buf), (_count))
#define | fdClose(_fd) fdio->close(_fd)
#define | fdOpen(_path, _flags, _mode) fdio->_open((_path), (_flags), (_mode))
#define | fdLink(_fd, _msg) ((FD_t)rpmioLinkPoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))
#define | fdFree(_fd, _msg) ((FD_t)rpmioFreePoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))
#define | fdNew(_msg) XfdNew(_msg, __FILE__, __LINE__)
enum | ftperrCode_e { FTPERR_NE_ERROR = -1, FTPERR_NE_LOOKUP = -2, FTPERR_NE_AUTH = -3, FTPERR_NE_PROXYAUTH = -4, FTPERR_NE_CONNECT = -5, FTPERR_NE_TIMEOUT = -6, FTPERR_NE_FAILED = -7, FTPERR_NE_RETRY = -8, FTPERR_NE_REDIRECT = -9, FTPERR_BAD_SERVER_RESPONSE = -81, FTPERR_SERVER_IO_ERROR = -82, FTPERR_SERVER_TIMEOUT = -83, FTPERR_BAD_HOST_ADDR = -84, FTPERR_BAD_HOSTNAME = -85, FTPERR_FAILED_CONNECT = -86, FTPERR_FILE_IO_ERROR = -87, FTPERR_PASSIVE_ERROR = -88, FTPERR_FAILED_DATA_CONNECT = -89, FTPERR_FILE_NOT_FOUND = -90, FTPERR_NIC_ABORT_IN_PROGRESS = -91, FTPERR_UNKNOWN = -100 }
| FTP and HTTP error codes. More...
typedef enum ftperrCode_e | ftperrCode
| FTP and HTTP error codes. More...
char *(* | Getpass )(const char *prompt)
| Return a password. More...
FDIO_t | fdio
FDIO_t | fpio
FDIO_t | ufdio
FDIO_t | gzdio
FDIO_t | bzdio
FDIO_t | lzdio
FDIO_t | xzdio
FD_t | fdDup (int fdno)
ssize_t | fdRead (void *cookie, char *buf, size_t count)
ssize_t | fdWrite (void *cookie, const char *buf, size_t count)
int | fdClose (void *cookie)
FD_t | fdOpen (const char *path, int flags, mode_t mode)
FD_t | fdLink (void *cookie, const char *msg)
FD_t | fdFree (FD_t fd, const char *msg)
FD_t | fdNew (const char *msg)
FD_t | XfdNew (const char *msg, const char *fn, unsigned ln)
int | fdWritable (FD_t fd, int secs)
int | fdReadable (FD_t fd, int secs)
int | rpmioMkpath (const char *path, mode_t mode, uid_t uid, gid_t gid)
| Insure that directories in path exist, creating as needed. More...
int | rpmioAccess (const char *FN, const char *path, int mode)
| Check FN access, expanding relative paths and twiddles. More...
char * | _GetPass (const char *prompt)
char * | _RequestPass (const char *prompt)
const char * | ftpStrerror (int errorNumber)
void * | ufdGetUrlinfo (FD_t fd)
const char * | urlStrerror (const char *url)
int | ufdCopy (FD_t sfd, FD_t tfd)
int | ufdGetFile (FD_t sfd, FD_t tfd)

## Macro Definition Documentation

#define fdClose | ( |  | _fd | ) | fdio->close(_fd)

Definition at line 522 of file rpmio.h.

#define fdFree | ( |  | _fd,
|  |  | _msg
| ) |  | ((FD_t)rpmioFreePoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))

Definition at line 547 of file rpmio.h.

#define fdLink | ( |  | _fd,
|  |  | _msg
| ) |  | ((FD_t)rpmioLinkPoolItem((rpmioItem)(_fd), _msg, __FILE__, __LINE__))

Definition at line 538 of file rpmio.h.

#define fdNew | ( |  | _msg | ) | XfdNew(_msg, __FILE__, __LINE__)

Definition at line 561 of file rpmio.h.

#define fdOpen | ( |  | _path,
|  |  | _flags,
|  |  | _mode
| ) |  | fdio->_open((_path), (_flags), (_mode))

Definition at line 529 of file rpmio.h.

#define fdRead | ( |  | _fd,
|  |  | _buf,
|  |  | _count
| ) |  | fdio->read((_fd), (_buf), (_count))

Definition at line 508 of file rpmio.h.

#define fdWrite | ( |  | _fd,
|  |  | _buf,
|  |  | _count
| ) |  | fdio->write((_fd), (_buf), (_count))

Definition at line 515 of file rpmio.h.

## Typedef Documentation

typedef int(* fdio_close_function_t)(void *cookie)

Definition at line 76 of file rpmio.h.

typedef FD_t(* fdio_fdopen_function_t)(void *cookie, const char *fmode)

Definition at line 88 of file rpmio.h.

typedef int(* fdio_flush_function_t)(void *cookie)

Definition at line 94 of file rpmio.h.

typedef FD_t(* fdio_fopen_function_t)(const char *path, const char *fmode)

Definition at line 82 of file rpmio.h.

typedef ssize_t(* fdio_read_function_t)(void *cookie, char *buf, size_t nbytes)

Definition at line 56 of file rpmio.h.

typedef int(* fdio_seek_function_t)(void *cookie, _libio_pos_t pos, int whence)

Definition at line 70 of file rpmio.h.

typedef ssize_t(* fdio_write_function_t)(void *cookie, const char *buf, size_t nbytes)

Definition at line 64 of file rpmio.h.

typedef enum ftperrCode_e ftperrCode

FTP and HTTP error codes.

## Enumeration Type Documentation

enum ftperrCode_e

FTP and HTTP error codes.

Enumerator
FTPERR_NE_ERROR | Generic error.
FTPERR_NE_LOOKUP | Hostname lookup failed.
FTPERR_NE_AUTH | Server authentication failed.
FTPERR_NE_PROXYAUTH | Proxy authentication failed.
FTPERR_NE_CONNECT | Could not connect to server.
FTPERR_NE_TIMEOUT | Connection timed out.
FTPERR_NE_FAILED | The precondition failed.
FTPERR_NE_RETRY | Retry request.
FTPERR_NE_REDIRECT | Redirect received.
FTPERR_BAD_SERVER_RESPONSE | Bad server response
FTPERR_SERVER_IO_ERROR | Server I/O error
FTPERR_SERVER_TIMEOUT | Server timeout
FTPERR_BAD_HOST_ADDR | Unable to lookup server host address
FTPERR_BAD_HOSTNAME | Unable to lookup server host name
FTPERR_FAILED_CONNECT | Failed to connect to server
FTPERR_FILE_IO_ERROR | Failed to establish data connection to server
FTPERR_PASSIVE_ERROR | I/O error to local file
FTPERR_FAILED_DATA_CONNECT | Error setting remote server to passive mode
FTPERR_FILE_NOT_FOUND | File not found on server
FTPERR_NIC_ABORT_IN_PROGRESS | Abort in progress
FTPERR_UNKNOWN | Unknown or unexpected error

Definition at line 615 of file rpmio.h.

## Function Documentation

char* _GetPass | ( | const char * | prompt | ) |

Definition at line 79 of file rpmku.c.

References _free(), _kuKeyring, and rpmExpand().

char* _RequestPass | ( | const char * | prompt | ) |

Definition at line 113 of file rpmku.c.

References argvSplit().

int Access | ( | const char * | path,
|  | int | amode
| ) |  |

access(2) clone.

Todo:
  Implement remotely.

Definition at line 1755 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by createDir(), main(), repoTestSetupDirs(), rpmdbRebuild(), and rpmioAccess().

int Chdir | ( | const char * | path | ) |

chdir(2) clone.

Definition at line 103 of file rpmrpc.c.

References _rpmio_debug, errno, ftpChdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by enterChroot(), getOutputFrom(), leaveChroot(), rpmpsmStage(), rpmtsRun(), and runScript().

int Chmod | ( | const char * | path,
|  | mode_t | mode
| ) |  |

chmod(2) clone.

Todo:
  Implement remotely.

Definition at line 1526 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by compare(), iosmStage(), mtreeMiss(), rpmdbMoveDatabase(), and sql_open().

int Chown | ( | const char * | path,
|  | uid_t | owner,
|  | gid_t | group
| ) |  |

chown(2) clone.

Todo:
  Implement remotely.

Definition at line 1447 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by compare(), createDir(), iosmStage(), mtreeMiss(), rpmdbMoveDatabase(), and rpmioMkpath().

int Chroot | ( | const char * | path | ) |

chroot(2) clone.

Todo:
  Implement remotely.

Definition at line 172 of file rpmrpc.c.

References _chroot_prefix, _free(), _rpmio_debug, errno, rpmGetPath(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by enterChroot(), leaveChroot(), rpmpsmStage(), rpmtsRun(), and runScript().

int Closedir | ( | DIR * | dir | ) |

closedir(3) clone.

Definition at line 1930 of file rpmrpc.c.

References _rpmio_debug, and avClosedir().

Referenced by Fts_open(), Glob(), and repoDoFinalMove().

int Fchmod | ( | FD_t | fd,
|  | mode_t | mode
| ) |  |

fchmod(2) clone.

Todo:
  Implement remotely.

Definition at line 1552 of file rpmrpc.c.

References _rpmio_debug, errno, fdGetOPath(), Fileno(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

int Fchown | ( | FD_t | fd,
|  | uid_t | owner,
|  | gid_t | group
| ) |  |

fchown(2) clone.

Todo:
  Implement remotely.

Definition at line 1473 of file rpmrpc.c.

References _rpmio_debug, errno, fdGetOPath(), Fileno(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

int Fclose | ( | FD_t | fd | ) |

fclose(3) clone.

Definition at line 2456 of file rpmio.c.

References FDIO_s::close, davDisconnect(), DBGIO, fdbg(), fdClose, fdFree(), fdGetFdno(), fdGetFILE, FDIOVEC, fdLink(), _FDSTACK_s::fdno, fdPop(), FDSANE, fdSetFp(), _FDSTACK_s::fp, fpio, _FD_s::fps, _FDSTACK_s::io, _FD_s::nfps, noLibio, _FD_s::persist, _FD_s::req, and ufdClose().

Referenced by addFileToTagAux(), closeCallback(), closeSpec(), compare(), cpio_doio(), dodigest(), doIcon(), IDTXglob(), iosmStage(), isCompressed(), main(), makeGPGSignature(), makeHDRSignature(), manageFile(), mtreeReadExcludes(), mtreeVisitF(), processPackageFiles(), readLineFromOFI(), repoFclose(), repoReadHeader(), rpmcliSign(), rpmdbExportInfo(), rpmdcFiniFile(), rpmdcInitFile(), rpmdcParseCoreutils(), rpmdsSysinfoFile(), rpmfd_dealloc(), rpmfd_free(), rpmfd_init(), rpmgiFini(), rpmgiLoadManifest(), rpmgiNext(), rpmgiOpen(), rpmgiReadHeader(), rpmHeaderFromFD(), rpmHeaderFromFile(), rpmHeaderToFD(), rpmHeaderToFile(), rpmInstallSource(), rpmInstallSourcePackage(), rpmiobSlurp(), rpmLoadMacroFile(), rpmpsmStage(), rpmShowProgress(), rpmSingleHeaderFromFD(), rpmTempFile(), rpmts_dealloc(), rpmts_free(), rpmts_HdrFromFdno(), rpmtsCallback(), rpmtsRollback(), rpmtsSolve(), runScript(), showVerifyPackage(), statFormat(), ufdGetFile(), unsatisfiedDepend(), urlFini(), urlGetFile(), and writeRPM().

int Fcntl | ( | FD_t | fd,
|  | int | op,
|  | void * | lip
| ) |  |

fcntl(2) clone.

Definition at line 2929 of file rpmio.c.

References Fileno().

int fdClose | ( | void * | cookie | ) |

FD_t fdDup | ( | int | fdno | ) |

Definition at line 249 of file rpmio.c.

References DBGIO, fdbg(), fdNew(), fdSetFdno(), and fdSetOpen().

Referenced by cpio_doio(), dodigest(), main(), rpmHeaderFromFD(), rpmHeaderToFD(), rpmpsmStage(), rpmSingleHeaderFromFD(), rpmts_HdrFromFdno(), rpmts_setattro(), rpmtsCallback(), runScript(), showVerifyPackage(), and ufdOpen().

FD_t fdFree | ( | FD_t | fd,
|  | const char * | msg
| ) |  |

Referenced by __fdClose(), closeCallback(), delTE(), Fclose(), fsmTeardown(), ftpAbort(), ftpCmd(), ftpFileDone(), iosmTeardown(), manageFile(), packageBinaries(), packageSources(), rpmShowProgress(), rpmtsFini(), rpmtsSetScriptFd(), ufdClose(), and urlConnect().

FD_t fdLink | ( | void * | cookie,
|  | const char * | msg
| ) |  |

Referenced by closeCallback(), Fclose(), Fdopen(), fsmSetup(), ftpLogin(), ftpNLST(), ftpOpen(), ftpReq(), httpOpen(), httpReq(), iosmSetup(), manageFile(), rpmfd_Fopen(), rpmInstallSourcePackage(), rpmShowProgress(), rpmtsSetScriptFd(), ufdOpen(), and urlConnect().

FD_t fdNew | ( | const char * | msg | ) |

Referenced by __fdOpen(), fdDup(), ftpOpen(), httpOpen(), packageBinaries(), packageSources(), and urlConnect().

FD_t Fdopen | ( | FD_t | ofd,
|  | const char * | fmode
| ) |  |

Definition at line 2640 of file rpmio.c.

References FDIO_s::_fdopen, _rpmio_debug, bzdio, FDIO_s::close, cvtfmode(), DBGIO, fdbg(), fdGetFp(), fdio, fdLink(), fdPush(), FDSANE, fdSetFp(), Fileno(), fpio, gzdio, lzdio, noLibio, FDIO_s::read, FDIO_s::seek, stpcpy(), ufdio, FDIO_s::write, and xzdio.

Referenced by cpio_doio(), Fopen(), main(), rpmpsmStage(), and rpmReadPackageManifest().

FD_t fdOpen | ( | const char * | path,
|  | int | flags,
|  | mode_t | mode
| ) |  |

ssize_t fdRead | ( | void * | cookie,
|  | char * | buf,
|  | size_t | count
| ) |  |

int fdReadable | ( | FD_t | fd,
|  | int | secs
| ) |  |

Definition at line 605 of file rpmio.c.

References errno, fdFileno(), and _FD_s::req.

Referenced by fdFgets(), ftpAbort(), ufdClose(), and ufdRead().

int fdWritable | ( | FD_t | fd,
|  | int | secs
| ) |  |

Definition at line 550 of file rpmio.c.

References _rpmio_debug, errno, fdFileno(), and _FD_s::req.

Referenced by checkResponse(), ftpLogin(), httpReq(), and ufdWrite().

ssize_t fdWrite | ( | void * | cookie,
|  | const char * | buf,
|  | size_t | count
| ) |  |

int Ferror | ( | FD_t | fd | ) |

ferror(3) clone.

Definition at line 2864 of file rpmio.c.

References bzdio, DBGIO, _FD_s::errcookie, fdbg(), fdFileno(), fdGetFILE, fpio, _FD_s::fps, gzdio, _FDSTACK_s::io, lzdio, _FD_s::nfps, _FD_s::req, _FD_s::syserrno, and xzdio.

Referenced by addFileToTagAux(), compare(), cpio_copy(), crc(), dodigest(), doIcon(), IDTXglob(), iosmStage(), isCompressed(), main(), makeGPGSignature(), makeHDRSignature(), manageFile(), mtreeReadExcludes(), mtreeVisitF(), processPackageFiles(), rdLead(), readFile(), readLineFromOFI(), repoReadHeader(), repoRfileDigest(), rpmcliSign(), rpmdcCalcFile(), rpmdcInitFile(), rpmdcParseCoreutils(), rpmdsSysinfoFile(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmInstallSource(), rpmiobSlurp(), rpmLoadMacroFile(), rpmpsmStage(), rpmReadPackageManifest(), rpmShowProgress(), rpmTempFile(), rpmtsSolve(), rpmWriteHeader(), runScript(), statFormat(), unsatisfiedDepend(), urlGetFile(), and writeRPM().

int Fflush | ( | FD_t | fd | ) |

fflush(3) clone.

Definition at line 2836 of file rpmio.c.

References FDIO_s::_flush, bzdio, fdGetFILE, fdGetFp(), fdGetIo(), fpio, gzdio, lzdio, and xzdio.

Referenced by copyFile(), cpio_doio(), extractRegular(), rpmdcPrintFile(), rpmpsmStage(), and writeRPM().

int Fileno | ( | FD_t | fd | ) |

fileno(3) clone.

Definition at line 2911 of file rpmio.c.

References DBGIO, fdbg(), _FDSTACK_s::fdno, _FD_s::fps, _FD_s::nfps, and _FD_s::req.

Referenced by cpio_doio(), extractRegular(), Fchmod(), Fchown(), Fcntl(), Fdopen(), Fstat(), printSize(), repoRfileDigest(), rpmiobSlurp(), rpmpsmStage(), rpmTempFile(), rpmtsCallback(), runScript(), ufdOpen(), writeFile(), and writeRPM().

FD_t Fopen | ( | const char * | path,
|  | const char * | fmode
| ) |  |

fopen(3) clone.

Definition at line 2755 of file rpmio.c.

References _free(), _rpmio_debug, cvtfmode(), fdClose, fdFileno(), fdGetFdno(), fdGetFp(), fdOpen, Fdopen(), fdPush(), fpio, _FD_s::req, rpmExpand(), ufdOpen(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlIsURL().

Referenced by addFileToTagAux(), compare(), dodigest(), doIcon(), IDTXglob(), iosmStage(), isCompressed(), main(), makeGPGSignature(), makeHDRSignature(), manageFile(), mtreeReadExcludes(), mtreeVisitF(), processPackageFiles(), readLineFromOFI(), repoDoRepoMetadata(), repoOpenMDFile(), repoReadHeader(), repoRfileDigest(), rpmcliSign(), rpmdbExportInfo(), rpmdcInitFile(), rpmdcParseCoreutils(), rpmdsSysinfoFile(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmHeaderFromFile(), rpmHeaderToFile(), rpmInstallSource(), rpmiobSlurp(), rpmLoadMacroFile(), rpmpsmStage(), rpmShowProgress(), rpmTempFile(), rpmtsRollback(), rpmtsSolve(), runScript(), statFormat(), unsatisfiedDepend(), urlGetFile(), and writeRPM().

size_t Fread | ( | void * | buf,
|  | size_t | size,
|  | size_t | nmemb,
|  | FD_t | fd
| ) |  |

fread(3) clone.

Definition at line 2379 of file rpmio.c.

References DBGIO, fdbg(), fdGetFILE, fdGetIo(), FDIOVEC, FDSANE, fpio, and FDIO_s::read.

Referenced by compare(), copyFile(), cpio_copy(), crc(), dodigest(), doIcon(), iosmStage(), isCompressed(), makeGPGSignature(), mtreeVisitF(), readFile(), repoReadHeader(), repoRfileDigest(), rpmdcCalcFile(), rpmiobSlurp(), rpmReadPackageFile(), statFormat(), ufdCopy(), unsatisfiedDepend(), and writeRPM().

int Fseek | ( | FD_t | fd,
|  | _libio_off_t | offset,
|  | int | whence
| ) |  |

fseek(3) clone.

Definition at line 2424 of file rpmio.c.

References DBGIO, fdbg(), fdGetFILE, fdGetIo(), FDIOVEC, FDSANE, fpio, and FDIO_s::seek.

int Fstat | ( | FD_t | fd,
|  | struct stat * | st
| ) |  |

fstat(2) clone.

Definition at line 1397 of file rpmrpc.c.

References _rpmio_debug, _FD_s::contentLength, errno, fdGetOPath(), Fileno(), hashFunctionString(), _FD_s::lastModified, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by printSize(), rpmiobSlurp(), and rpmReadHeader().

const char* Fstrerror | ( | FD_t | fd | ) |

strerror(3) clone.

Definition at line 2368 of file rpmio.c.

References errno, FDSANE, and getFdErrstr().

Referenced by compare(), copyFile(), cpio_copy(), doIcon(), IDTXglob(), isCompressed(), main(), manageFile(), mtreeReadExcludes(), mtreeVisitF(), processPackageFiles(), rdLead(), readFile(), readLineFromOFI(), repoOpenMDFile(), repoReadHeader(), rfileXMLWrite(), rpmcliSign(), rpmdcInitFile(), rpmdcParseCoreutils(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmInstallSource(), rpmpsmStage(), rpmReadPackageFile(), rpmReadPackageManifest(), rpmReSign(), rpmShowProgress(), rpmtsSolve(), rpmWriteHeader(), statFormat(), urlGetFile(), and writeRPM().

const char* ftpStrerror | ( | int | errorNumber | ) |

Definition at line 723 of file rpmio.c.

References _, FTPERR_BAD_HOST_ADDR, FTPERR_BAD_HOSTNAME, FTPERR_BAD_SERVER_RESPONSE, FTPERR_FAILED_CONNECT, FTPERR_FAILED_DATA_CONNECT, FTPERR_FILE_IO_ERROR, FTPERR_FILE_NOT_FOUND, FTPERR_NE_AUTH, FTPERR_NE_CONNECT, FTPERR_NE_ERROR, FTPERR_NE_FAILED, FTPERR_NE_LOOKUP, FTPERR_NE_PROXYAUTH, FTPERR_NE_REDIRECT, FTPERR_NE_RETRY, FTPERR_NE_TIMEOUT, FTPERR_NIC_ABORT_IN_PROGRESS, FTPERR_PASSIVE_ERROR, FTPERR_SERVER_IO_ERROR, FTPERR_SERVER_TIMEOUT, and FTPERR_UNKNOWN.

Referenced by ftpLogin(), ftpReq(), httpReq(), prepFetch(), tcpConnect(), ufdCopy(), and urlStrerror().

size_t Fwrite | ( | const void * | buf,
|  | size_t | size,
|  | size_t | nmemb,
|  | FD_t | fd
| ) |  |

fwrite(3) clone.

Definition at line 2401 of file rpmio.c.

References DBGIO, fdbg(), fdGetFILE, fdGetIo(), FDIOVEC, FDSANE, fpio, and FDIO_s::write.

Referenced by copyFile(), cpio_copy(), iosmStage(), main(), repoOpenMDFile(), rfileXMLWrite(), rpmdcPrintFile(), rpmWriteHeader(), runScript(), ufdCopy(), writeRPM(), wrLead(), and wrSignature().

int Glob | ( | const char * | pattern,
|  | int | flags,
|  | int | errfuncconst char *epath, int eerrno,
|  | void * | _pglob
| ) |  |

glob(3) clone.

Definition at line 1832 of file rpmrpc.c.

References _rpmio_debug, Closedir(), getenv(), glob_t::gl_closedir, glob_t::gl_lstat, glob_t::gl_opendir, glob_t::gl_readdir, glob_t::gl_stat, glob(), GLOB_ALTDIRFUNC, GLOB_TILDE, Lstat(), Opendir(), Readdir(), Stat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by rpmGlob().

int Glob_error | ( | const char * | epath,
|  | int | eerrno
| ) |  |

glob_error(3) clone.

Definition at line 1826 of file rpmrpc.c.

Referenced by rpmGlob().

int Glob_pattern_p | ( | const char * | pattern,
|  | int | quote
| ) |  |

glob_pattern_p(3) clone.

Definition at line 1786 of file rpmrpc.c.

References URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, and urlPath().

Referenced by handleOneTrigger(), initGlobs(), processBinaryFile(), rpmdbTriggerGlobs(), rpmGlob(), and runImmedTriggers().

void Globfree | ( | void * | _pglob | ) |

globfree(3) clone.

Definition at line 1876 of file rpmrpc.c.

References _rpmio_debug, and globfree().

Referenced by rpmGlob().

int Lchown | ( | const char * | path,
|  | uid_t | owner,
|  | gid_t | group
| ) |  |

lchown(2) clone.

Todo:
  Implement remotely.

Definition at line 1500 of file rpmrpc.c.

References _rpmio_debug, errno, lchown, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by iosmStage().

int Link | ( | const char * | oldpath,
|  | const char * | newpath
| ) |  |

link(2) clone.

Definition at line 317 of file rpmrpc.c.

References _rpmio_debug, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrncasecmp().

Referenced by iosmStage().

off_t Lseek | ( | int | fdno,
|  | off_t | offset,
|  | int | whence
| ) |  |

lseek(2) clone.

Todo:
  Implement SEEK_HOLE/SEEK_DATA.

Definition at line 2027 of file rpmrpc.c.

References _rpmio_debug.

int Lstat | ( | const char * | path,
|  | struct stat * | st
| ) |  |

lstat(2) clone.

Definition at line 1363 of file rpmrpc.c.

References _rpmio_debug, davLstat(), errno, ftpLstat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by addFile(), checkOwners(), Fts_open(), Glob(), iosmStage(), main(), prepFetch(), rpmfiDecideFate(), rpmQueryVerify(), rpmtsRun(), rpmVerifyFile(), and statFormat().

int Mkdir | ( | const char * | path,
|  | mode_t | mode
| ) |  |

mkdir(2) clone.

Definition at line 72 of file rpmrpc.c.

References _rpmio_debug, davMkdir(), ftpMkdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by iosmStage(), mtreeMiss(), repoMkdir(), rpmdbRebuild(), rpmioMkpath(), and rpmMkdirPath().

int Mkfifo | ( | const char * | path,
|  | mode_t | mode
| ) |  |

mkfifo(3) clone.

Todo:
  Implement remotely.

Definition at line 1579 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by iosmStage().

int Mknod | ( | const char * | path,
|  | mode_t | mode,
|  | dev_t | dev
| ) |  |

mknod(3) clone.

Todo:
  Implement remotely.

Definition at line 1605 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by iosmStage().

int Open | ( | const char * | path,
|  | int | flags,
|  | mode_t | mode
| ) |  |

open(2) clone.

Todo:
  Implement remotely.

Definition at line 210 of file rpmrpc.c.

References _chroot_prefix, _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by db_init().

DIR* Opendir | ( | const char * | path | ) |

opendir(3) clone.

Definition at line 1884 of file rpmrpc.c.

References _rpmio_debug, davOpendir(), ftpOpendir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by Fts_open(), Glob(), and repoDoFinalMove().

struct dirent* Readdir | ( | DIR * | dir | ) |
| read

readdir(3) clone.

Definition at line 1919 of file rpmrpc.c.

References _rpmio_debug, and avReaddir().

Referenced by Fts_open(), Glob(), and repoDoFinalMove().

int Readlink | ( | const char * | path,
|  | char * | buf,
|  | size_t | bufsiz
| ) |  |

readlink(2) clone.

Todo:
  Implement remotely.

Definition at line 1717 of file rpmrpc.c.

References _rpmio_debug, errno, ftpReadlink(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by genCpioListAndHeader(), iosmStage(), rlink(), rpmfiDecideFate(), rpmVerifyFile(), and statFormat().

char* Realpath | ( | const char * | path,
|  | char * | resolved_path
| ) |  |

realpath(3) clone.

Definition at line 1941 of file rpmrpc.c.

References _free(), _rpmio_debug, davRealpath(), ftpRealpath(), PATH_MAX, realpath(), rpmExpand(), rpmGetPath(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrdup().

Referenced by doLookup(), main(), repoDoPkgMetadata(), repoRealpath(), rpmdbURIPath(), rpmQueryVerify(), and rpmReadHeader().

int Rename | ( | const char * | oldpath,
|  | const char * | newpath
| ) |  |

rename(2) clone.

Definition at line 260 of file rpmrpc.c.

References _rpmio_debug, davRename(), ftpRename(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and xstrncasecmp().

Referenced by iosmStage(), repoDoFinalMove(), repoDoRepoMetadata(), rpmdbMoveDatabase(), and rpmReSign().

int Rmdir | ( | const char * | path | ) |

rmdir(2) clone.

Definition at line 138 of file rpmrpc.c.

References _rpmio_debug, davRmdir(), ftpRmdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by buildSpec(), iosmStage(), mtreeVWalk(), repoDoFinalMove(), rpmdbRebuild(), and rpmdbRemoveDatabase().

int rpmioAccess | ( | const char * | FN,
|  | const char * | path,
|  | int | mode
| ) |  |

Check FN access, expanding relative paths and twiddles.

Parameters

  FN | file path to check
  path | colon separated search path (NULL uses $PATH)
  mode | type of access(2) to check (0 uses X_OK)

Returns
  0 if accessible

Definition at line 2992 of file rpmio.c.

References _path, _rpmio_debug, Access(), alloca_strdup, F_OK, getenv(), R_OK, rpmCleanPath(), stpcpy(), W_OK, and X_OK.

Referenced by rpmtsPRCO(), and unsatisfiedDepend().

void rpmioClean | ( | void |  | ) |

Free all memory allocated by rpmio usage.

Definition at line 3133 of file rpmio.c.

References _digPool, _htPool, _mirePool, _rpmiobPool, _rpmluaPool, _rpmluavPool, _rpmmgPool, _urlPool, _xarPool, davDestroy(), rpmioFreePool(), rpmlogClose(), rpmluaFree(), and urlFreeCache().

Referenced by rpmcliFini(), and rpmioFini().

rpmioPool rpmioFreePool | ( | rpmioPool | pool | ) |

Reclaim memory pool items.

Parameters

  pool | memory pool (NULL uses global rpmio pool)

Returns
  NULL always

Definition at line 68 of file rpmmalloc.c.

References _free(), _rpmioPool, D_, rpmioPool_s::have, rpmioPool_s::head, rpmioPool_s::made, rpmioPool_s::name, rpmioItem_s::pool, rpmioPool_s::reused, rpmlog(), RPMLOG_DEBUG, and rpmioItem_s::use.

Referenced by rpmcliFini(), and rpmioClean().

void* rpmioFreePoolItem | ( | rpmioItem | item,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |  |

Free a pool item.

Parameters

  item | pool item
  msg | debugging msg (NULL disables debugging)
  fn | usually FILE
  ln | usually LINE

Returns
  pool item (NULL on last dereference)

Definition at line 170 of file rpmmalloc.c.

References rpmioPool_s::dbg, rpmioPool_s::fini, rpmioPool_s::flags, L, rpmioPool_s::name, rpmioItem_s::pool, rpmioPutPool(), and rpmioItem_s::use.

Referenced by mireFreeAll(), rpmmiInit(), and urlFini().

rpmioItem rpmioGetPool | ( | rpmioPool | pool,
|  | size_t | size
| ) |  |

Get unused item from pool, or alloc a new item.

Parameters

  pool | memory pool (NULL will always alloc a new item)
  size | item size

Returns
  new item

Definition at line 201 of file rpmmalloc.c.

References rpmioPool_s::have, rpmioPool_s::head, rpmioPool_s::limit, rpmioPool_s::made, rpmioItem_s::pool, rpmioPool_s::reused, rpmioPool_s::tail, rpmioItem_s::use, and xcalloc().

Referenced by digGetPool(), fdGetPool(), headerGetPool(), htGetPool(), mireGetPool(), rpmdbGetPool(), rpmdsGetPool(), rpmfcGetPool(), rpmfiGetPool(), rpmgiGetPool(), rpmiobGetPool(), rpmmgGetPool(), rpmmiGetPool(), rpmpsGetPool(), rpmpsmGetPool(), rpmsxGetPool(), rpmteGetPool(), rpmtsGetPool(), rpmtsiGetPool(), rpmxarGetPool(), and urlGetPool().

rpmioItem rpmioLinkPoolItem | ( | rpmioItem | item,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |  |

Increment a pool item refcount.

Parameters

  item | pool item
  msg | debugging msg (NULL disables debugging)
  fn | usually FILE
  ln | usually LINE

Returns
  pool item

Definition at line 150 of file rpmmalloc.c.

References rpmioPool_s::dbg, rpmioPool_s::flags, rpmioPool_s::name, rpmioItem_s::pool, and rpmioItem_s::use.

Referenced by rpmmiInit(), XfdNew(), XrpmtsiInit(), and XurlNew().

int rpmioMkpath | ( | const char * | path,
|  | mode_t | mode,
|  | uid_t | uid,
|  | gid_t | gid
| ) |  |

Insure that directories in path exist, creating as needed.

Parameters

  path | directory path
  mode | directory mode (if created)
  uid | directory uid (if created), or -1 to skip
  gid | directory uid (if created), or -1 to skip

Returns
  0 on success, errno (or -1) on error

Definition at line 2937 of file rpmio.c.

References alloca(), Chown(), D_, errno, Mkdir(), rpmlog(), RPMLOG_DEBUG, Stat(), and stpcpy().

Referenced by db3open(), doSetupMacro(), packageBinaries(), packageSources(), repoMkdir(), rpmTempFile(), and sql_open().

rpmioPool rpmioNewPool | ( | const char * | name,
|  | size_t | size,
|  | int | limit,
|  | int | flags,
|  | const char *(*)(void *item) | dbg,
|  | void(*)(void *item) | init,
|  | void(*)(void *item) | fini
| ) |  |

Create a memory pool.

Parameters

  name | pool name
  size | item size
  limit | no. of items permitted (-1 for unlimited)
  flags | debugging flags
  (*dbg)() | generate string for Unlink/Link/Free debugging
  (*init)() | create item contents
  (*fini)() | destroy item contents

Returns
  memory pool

Definition at line 102 of file rpmmalloc.c.

References D_, rpmioPool_s::dbg, rpmioPool_s::fini, rpmioPool_s::flags, rpmioPool_s::have, rpmioPool_s::head, rpmioPool_s::init, rpmioPool_s::limit, rpmioPool_s::made, name, rpmioPool_s::name, rpmioPool_s::pool, rpmioPool_s::reused, rpmlog(), RPMLOG_DEBUG, rpmioPool_s::size, rpmioPool_s::tail, xcalloc(), and rpmioPool_s::zlog.

Referenced by digGetPool(), fdGetPool(), headerGetPool(), htGetPool(), mireGetPool(), rpmdbGetPool(), rpmdsGetPool(), rpmfcGetPool(), rpmfiGetPool(), rpmgiGetPool(), rpmiobGetPool(), rpmmgGetPool(), rpmmiGetPool(), rpmpsGetPool(), rpmpsmGetPool(), rpmsxGetPool(), rpmteGetPool(), rpmtsGetPool(), rpmtsiGetPool(), rpmxarGetPool(), and urlGetPool().

rpmioItem rpmioPutPool | ( | rpmioItem | item | ) |

Put unused item into pool (or free).

Parameters

  _item | unused item

Returns
  NULL always

Definition at line 239 of file rpmmalloc.c.

References _free(), rpmioPool_s::have, rpmioItem_s::pool, rpmioPool_s::tail, and rpmioItem_s::use.

Referenced by headerLoad(), rpmdbClose(), rpmdbNew(), rpmioFreePoolItem(), and rpmpsFree().

rpmioItem rpmioUnlinkPoolItem | ( | rpmioItem | item,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |  |

Decrement a pool item refcount.

Parameters

  item | pool item
  msg | debugging msg (NULL disables debugging)
  fn | usually FILE
  ln | usually LINE

Returns
  pool item (NULL on last dereference)

Definition at line 129 of file rpmmalloc.c.

References rpmioPool_s::dbg, rpmioPool_s::flags, rpmioPool_s::name, rpmioItem_s::pool, and rpmioItem_s::use.

int Stat | ( | const char * | path,
|  | struct stat * | st
| ) |  |

stat(2) clone.

Definition at line 1329 of file rpmrpc.c.

References _rpmio_debug, davStat(), errno, ftpStat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by cacheStashLatest(), db3open(), Fts_open(), getFilesystemList(), Glob(), iosmStage(), main(), makeGPGSignature(), mtreeMiss(), packageBinaries(), populateInstallHeader(), processSourceFiles(), rpmAddSignature(), rpmcliEvalSlurp(), rpmdbMoveDatabase(), rpmdsSysinfo(), rpmGetFilesystemUsage(), rpmioExists(), rpmioFileExists(), rpmioMkpath(), and rpmMkdirPath().

int Symlink | ( | const char * | oldpath,
|  | const char * | newpath
| ) |  |

symlink(3) clone.

Todo:
  Implement remotely.

Definition at line 1687 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by iosmStage(), and mtreeMiss().

int ufdCopy | ( | FD_t | sfd,
|  | FD_t | tfd
| ) |  |

Definition at line 1514 of file rpmio.c.

References DBGIO, Fread(), FTPERR_FILE_IO_ERROR, ftpStrerror(), Fwrite(), RPMCALLBACK_INST_OPEN_FILE, and RPMCALLBACK_INST_PROGRESS.

Referenced by main(), and ufdGetFile().

int ufdGetFile | ( | FD_t | sfd,
|  | FD_t | tfd
| ) |  |

Definition at line 1626 of file rpmio.c.

References Fclose(), FDSANE, and ufdCopy().

Referenced by urlGetFile().

void* ufdGetUrlinfo | ( | FD_t | fd | ) |

Definition at line 1895 of file rpmio.c.

References FDSANE, _FD_s::url, and urlLink().

int Unlink | ( | const char * | path | ) |

unlink(2) clone.

Definition at line 367 of file rpmrpc.c.

References _rpmio_debug, davUnlink(), ftpUnlink(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by buildSpec(), db3open(), fsmStage(), iosmStage(), isSpecFile(), makeGPGSignature(), makeHDRSignature(), mtreeVWalk(), repoDoFinalMove(), repoDoRepoMetadata(), rpmdbExportInfo(), rpmdbMoveDatabase(), rpmdbRemoveDatabase(), rpmReSign(), rpmtsRollback(), runScript(), sql_close(), urlGetFile(), and writeRPM().

const char* urlStrerror | ( | const char * | url | ) |

Definition at line 778 of file rpmio.c.

References _, errno, ftpStrerror(), urlinfo_s::openError, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, urlIsURL(), and urlSplit().

int Utime | ( | const char * | path,
|  | const struct utimbuf * | buf
| ) |  |

Definition at line 1633 of file rpmrpc.c.

References _rpmio_debug, errno, URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().

Referenced by iosmStage(), rpmdbExportInfo(), and rpmdbMoveDatabase().

int Utimes | ( | const char * | path,
|  | const struct timeval * | times
| ) |  |

utimes(2) clone.

Todo:
  Implement remotely.

Referenced by compare().

FD_t XfdNew | ( | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |  |

Definition at line 327 of file rpmio.c.

References _FD_s::bytesRemain, _FD_s::contentDisposition, _FD_s::contentLength, _FD_s::contentType, _FD_s::dig, _FD_s::digests, _FD_s::errcookie, _FD_s::fd_cpioPos, fdGetPool(), FDMAGIC, _FDSTACK_s::fdno, _FD_s::flags, _FDSTACK_s::fp, _FD_s::fps, _FD_s::ftpFileDoneNeeded, _FDSTACK_s::io, _FD_s::lastModified, _FD_s::magic, _FD_s::ndigests, _FD_s::nfps, _FD_s::oflags, _FD_s::omode, _FD_s::opath, _FD_s::rd_timeoutsecs, rpmioLinkPoolItem(), _FD_s::stats, _FD_s::syserrno, ufdio, _FD_s::url, URL_IS_UNKNOWN, _FD_s::urlType, _FD_s::wr_chunked, _FD_s::xar, and xcalloc().

## Variable Documentation

const char* _chroot_prefix

Definition at line 170 of file rpmrpc.c.

Referenced by Chroot(), and Open().

rpmioPool _fdPool

Definition at line 309 of file rpmio.c.

Referenced by fdGetPool().

FDIO_t bzdio

Referenced by fdbg(), Fdopen(), Ferror(), Fflush(), and getFdErrstr().

FDIO_t fdio

Definition at line 548 of file rpmio.c.

Referenced by fdbg(), Fdopen(), and urlFini().

FDIO_t fpio

Definition at line 3203 of file rpmio.c.

Referenced by Fclose(), fdbg(), Fdopen(), Ferror(), Fflush(), Fopen(), Fread(), Fseek(), Fwrite(), and urlFini().

char*(* Getpass)(const char *prompt)

Return a password.

Parameters

  prompt | prompt string

Returns
  password

Definition at line 146 of file rpmku.c.

Referenced by main(), and urlFind().

FDIO_t gzdio

Referenced by fdbg(), Fdopen(), Ferror(), Fflush(), and getFdErrstr().

FDIO_t lzdio

Referenced by fdbg(), Fdopen(), Ferror(), Fflush(), and getFdErrstr().

FDIO_t ufdio

Definition at line 2329 of file rpmio.c.

Referenced by fdbg(), Fdopen(), ftpAbort(), ftpOpen(), httpOpen(), ufdOpen(), urlConnect(), and XfdNew().

FDIO_t xzdio

Referenced by fdbg(), Fdopen(), Ferror(), Fflush(), and getFdErrstr().