#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include "glob.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | FDIO_s |
RPMIO Utilities. | |
#define | fdFileno(_fd) fdio->_fileno(_fd) |
#define | fdOpen(_path, _flags, _mode) fdio->_open((_path), (_flags), (_mode)) |
#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 | fdLink(_fd, _msg) fdio->_fdref(_fd, _msg, __FILE__, __LINE__) |
#define | fdFree(_fd, _msg) fdio->_fdderef(_fd, _msg, __FILE__, __LINE__) |
#define | fdNew(_msg) fdio->_fdnew(_msg, __FILE__, __LINE__) |
#define | timedRead (ufdio->read) |
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 |
FDIO_t | fdio |
FDIO_t | fpio |
FDIO_t | ufdio |
FDIO_t | gzdio |
FDIO_t | bzdio |
FDIO_t | lzdio |
FDIO_t | fadio |
off_t | fdSize (FD_t fd) |
FD_t | fdDup (int fdno) |
int | fdFileno (void *cookie) |
FD_t | fdOpen (const char *path, int flags, mode_t mode) |
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 | fdLink (void *cookie, const char *msg) |
FD_t | fdFree (FD_t fd, const char *msg) |
FD_t | fdNew (const char *msg) |
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. | |
char * | rpmEscapeSpaces (const char *s) |
Escape isspace(3) characters in string. | |
const char *const | 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) |
int | timedRead (FD_t fd, void *bufptr, int length) |
Typedefs | |
typedef struct pgpDig_s * | pgpDig |
typedef struct pgpDigParams_s * | pgpDigParams |
typedef struct _FD_s * | FD_t |
typedef struct FDIO_s * | FDIO_t |
typedef off_t | _libio_off_t |
Hide libio API lossage. | |
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_ref_function_t )(void *cookie, const char *msg, const char *file, unsigned line) |
typedef FD_t(* | fdio_deref_function_t )(FD_t fd, const char *msg, const char *file, unsigned line) |
typedef FD_t(* | fdio_new_function_t )(const char *msg, const char *file, unsigned line) |
typedef int(* | fdio_fileno_function_t )(void *cookie) |
typedef FD_t(* | fdio_open_function_t )(const char *path, int flags, mode_t mode) |
typedef FD_t(* | fdio_fopen_function_t )(const char *path, const char *fmode) |
typedef void *(* | fdio_ffileno_function_t )(FD_t fd) |
typedef int(* | fdio_fflush_function_t )(FD_t fd) |
RPMRPC Vectors. | |
typedef int(* | fdio_mkdir_function_t )(const char *path, mode_t mode) |
typedef int(* | fdio_chdir_function_t )(const char *path) |
typedef int(* | fdio_rmdir_function_t )(const char *path) |
typedef int(* | fdio_rename_function_t )(const char *oldpath, const char *newpath) |
typedef int(* | fdio_unlink_function_t )(const char *path) |
typedef int(* | fdio_stat_function_t )(const char *path, struct stat *st) |
typedef int(* | fdio_lstat_function_t )(const char *path, struct stat *st) |
typedef int(* | fdio_access_function_t )(const char *path, int amode) |
Functions | |
static int | xislower (int c) |
static int | xisupper (int c) |
static int | xisalpha (int c) |
static int | xisdigit (int c) |
static int | xisalnum (int c) |
static int | xisblank (int c) |
static int | xisspace (int c) |
static int | xtolower (int c) |
static int | xtoupper (int c) |
int | xstrcasecmp (const char *s1, const char *s2) |
Locale insensitive strcasecmp(3). | |
int | xstrncasecmp (const char *s1, const char *s2, size_t n) |
Locale insensitive strncasecmp(3). | |
RPMIO Interface. | |
const char * | Fstrerror (FD_t fd) |
strerror(3) clone. | |
size_t | Fread (void *buf, size_t size, size_t nmemb, FD_t fd) |
fread(3) clone. | |
size_t | Fwrite (const void *buf, size_t size, size_t nmemb, FD_t fd) |
fwrite(3) clone. | |
int | Fseek (FD_t fd, _libio_off_t offset, int whence) |
fseek(3) clone. | |
int | Fclose (FD_t fd) |
fclose(3) clone. | |
FD_t | Fdopen (FD_t ofd, const char *fmode) |
FD_t | Fopen (const char *path, const char *fmode) |
fopen(3) clone. | |
int | Fflush (FD_t fd) |
fflush(3) clone. | |
int | Ferror (FD_t fd) |
ferror(3) clone. | |
int | Fileno (FD_t fd) |
fileno(3) clone. | |
int | Fcntl (FD_t fd, int op, void *lip) |
fcntl(2) clone. | |
RPMRPC Interface. | |
int | Mkdir (const char *path, mode_t mode) |
mkdir(2) clone. | |
int | Chdir (const char *path) |
chdir(2) clone. | |
int | Rmdir (const char *path) |
rmdir(2) clone. | |
int | Rename (const char *oldpath, const char *newpath) |
rename(2) clone. | |
int | Link (const char *oldpath, const char *newpath) |
link(2) clone. | |
int | Unlink (const char *path) |
unlink(2) clone. | |
int | Readlink (const char *path, char *buf, size_t bufsiz) |
readlink(2) clone. | |
int | Stat (const char *path, struct stat *st) |
stat(2) clone. | |
int | Lstat (const char *path, struct stat *st) |
lstat(2) clone. | |
int | Access (const char *path, int amode) |
access(2) clone. | |
int | Glob_pattern_p (const char *pattern, int quote) |
glob_pattern_p(3) clone. | |
int | Glob_error (const char *epath, int eerrno) |
glob_error(3) clone. | |
int | Glob (const char *pattern, int flags, int errfunc(const char *epath, int eerrno), glob_t *pglob) |
glob(3) clone. | |
void | Globfree (glob_t *pglob) |
globfree(3) clone. | |
DIR * | Opendir (const char *path) |
opendir(3) clone. | |
struct dirent * | Readdir (DIR *dir) |
readdir(3) clone. | |
int | Closedir (DIR *dir) |
closedir(3) clone. |
Definition in file rpmio.h.
#define fdFileno | ( | _fd | ) | fdio->_fileno(_fd) |
Definition at line 481 of file rpmio.h.
Referenced by __fdClose(), __fdRead(), __fdWrite(), fdFgets(), fdReadable(), fdSeek(), fdWritable(), ftpAbort(), ftpLogin(), ftpReq(), httpReq(), lzdRead(), lzopen_internal(), ufdRead(), and urlConnect().
#define fdFree | ( | _fd, | |||
_msg | ) | fdio->_fdderef(_fd, _msg, __FILE__, __LINE__) |
Definition at line 532 of file rpmio.h.
Referenced by __fdClose(), closeCallback(), delTE(), fsmTeardown(), ftpAbort(), ftpCmd(), ftpFileDone(), manageFile(), packageBinaries(), packageSources(), rpmShowProgress(), rpmtsFree(), rpmtsSetScriptFd(), ufdClose(), and urlConnect().
#define fdLink | ( | _fd, | |||
_msg | ) | fdio->_fdref(_fd, _msg, __FILE__, __LINE__) |
Definition at line 523 of file rpmio.h.
Referenced by closeCallback(), fsmSetup(), ftpLogin(), ftpNLST(), ftpOpen(), ftpReq(), httpOpen(), httpReq(), lzdRead(), manageFile(), rpmfd_Fopen(), rpmInstallSourcePackage(), rpmShowProgress(), rpmtsSetScriptFd(), ufdOpen(), and urlConnect().
#define fdNew | ( | _msg | ) | fdio->_fdnew(_msg, __FILE__, __LINE__) |
Definition at line 541 of file rpmio.h.
Referenced by __fdOpen(), fdDup(), ftpOpen(), httpOpen(), packageBinaries(), packageSources(), rewriteRPM(), and urlConnect().
#define fdOpen | ( | _path, | |||
_flags, | |||||
_mode | ) | fdio->_open((_path), (_flags), (_mode)) |
#define fdRead | ( | _fd, | |||
_buf, | |||||
_count | ) | fdio->read((_fd), (_buf), (_count)) |
#define fdWrite | ( | _fd, | |||
_buf, | |||||
_count | ) | fdio->write((_fd), (_buf), (_count)) |
#define timedRead (ufdio->read) |
Definition at line 646 of file rpmio.h.
Referenced by ftpAbort(), makeGPGSignature(), makePGPSignature(), readLead(), rpmReadHeader(), and rpmReadSignature().
typedef int(* fdio_access_function_t)(const char *path, int amode) |
typedef int(* fdio_chdir_function_t)(const char *path) |
typedef int(* fdio_close_function_t)(void *cookie) |
typedef FD_t(* fdio_deref_function_t)(FD_t fd, const char *msg, const char *file, unsigned line) |
typedef void*(* fdio_ffileno_function_t)(FD_t fd) |
typedef int(* fdio_fflush_function_t)(FD_t fd) |
typedef int(* fdio_fileno_function_t)(void *cookie) |
typedef FD_t(* fdio_fopen_function_t)(const char *path, const char *fmode) |
typedef int(* fdio_lstat_function_t)(const char *path,struct stat *st) |
typedef int(* fdio_mkdir_function_t)(const char *path, mode_t mode) |
typedef FD_t(* fdio_new_function_t)(const char *msg, const char *file, unsigned line) |
typedef FD_t(* fdio_open_function_t)(const char *path, int flags, mode_t mode) |
typedef ssize_t(* fdio_read_function_t)(void *cookie, char *buf, size_t nbytes) |
typedef FD_t(* fdio_ref_function_t)(void *cookie, const char *msg, const char *file, unsigned line) |
typedef int(* fdio_rename_function_t)(const char *oldpath, const char *newpath) |
typedef int(* fdio_rmdir_function_t)(const char *path) |
typedef int(* fdio_seek_function_t)(void *cookie, _libio_pos_t pos, int whence) |
typedef int(* fdio_stat_function_t)(const char *path,struct stat *st) |
typedef int(* fdio_unlink_function_t)(const char *path) |
typedef ssize_t(* fdio_write_function_t)(void *cookie, const char *buf, size_t nbytes) |
typedef enum ftperrCode_e ftperrCode |
typedef struct pgpDigParams_s* pgpDigParams |
enum ftperrCode_e |
FTP and HTTP error codes.
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 |
int Access | ( | const char * | path, | |
int | amode | |||
) |
int Chdir | ( | const char * | path | ) |
chdir(2) clone.
Definition at line 114 of file rpmrpc.c.
References ftpChdir(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath().
int Closedir | ( | DIR * | dir | ) |
int Fclose | ( | FD_t | fd | ) |
fclose(3) clone.
Definition at line 3221 of file rpmio.c.
Referenced by addFileToTagAux(), closeCallback(), closeSpec(), cpio_doio(), defaultMachine(), doReadRC(), doScript(), fsmStage(), ftsStashLatest(), IDTXglob(), isSpecFile(), main(), makeGPGSignature(), makeHDRSignature(), makePGPSignature(), makeTempFile(), manageFile(), processPackageFiles(), readIcon(), readLineFromOFI(), readRPM(), rewriteRPM(), rpmcliSign(), rpmfd_dealloc(), rpmfd_free(), rpmfd_init(), rpmgiFree(), rpmgiLoadManifest(), rpmgiNext(), rpmgiOpen(), rpmgiReadHeader(), rpmGraph(), rpmHeaderFromFD(), rpmHeaderFromFile(), rpmInstall(), rpmInstallSource(), rpmInstallSourcePackage(), rpmMergeHeadersFromFD(), rpmShowProgress(), rpmSingleHeaderFromFD(), rpmts_dealloc(), rpmts_free(), rpmts_HdrFromFdno(), rpmtsCallback(), rpmtsSolve(), rpmxpProcess(), showVerifyPackage(), ufdGetFile(), urlGetFile(), writeRPM(), and XurlFree().
int fdClose | ( | void * | cookie | ) |
FD_t fdDup | ( | int | fdno | ) |
Definition at line 240 of file rpmio.c.
References DBGIO, fdbg(), fdNew, and fdSetFdno().
Referenced by cpio_doio(), main(), readRPM(), rpmHeaderFromFD(), rpmMergeHeadersFromFD(), rpmSingleHeaderFromFD(), rpmts_HdrFromFdno(), rpmts_setattro(), rpmtsCallback(), showVerifyPackage(), and ufdOpen().
int fdFileno | ( | void * | cookie | ) |
FD_t fdLink | ( | void * | cookie, | |
const char * | msg | |||
) |
FD_t fdNew | ( | const char * | msg | ) |
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 573 of file rpmio.c.
References errno, fdFileno, and _FD_s::req.
Referenced by fdFgets(), ftpAbort(), ufdClose(), and ufdRead().
off_t fdSize | ( | FD_t | fd | ) |
Definition at line 213 of file rpmio.c.
References _FD_s::contentLength, DBGIO, FDSANE, Fileno(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and _FD_s::urlType.
Referenced by doReadRC(), and readIcon().
int fdWritable | ( | FD_t | fd, | |
int | secs | |||
) |
Definition at line 518 of file rpmio.c.
References _rpmio_debug, errno, fdFileno, _FD_s::req, and strerror.
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 3597 of file rpmio.c.
Referenced by addFileToTagAux(), cpio_copy(), defaultMachine(), doReadRC(), doScript(), fsmStage(), ftsStashLatest(), IDTXglob(), isSpecFile(), main(), makeGPGSignature(), makeHDRSignature(), makePGPSignature(), makeTempFile(), manageFile(), processPackageFiles(), readIcon(), readLead(), readLineFromOFI(), readRPM(), rpmcliSign(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmGraph(), rpmInstall(), rpmInstallSource(), rpmShowProgress(), rpmtsSolve(), urlGetFile(), and writeRPM().
int Fflush | ( | FD_t | fd | ) |
fflush(3) clone.
Definition at line 3577 of file rpmio.c.
Referenced by copyFile(), cpio_doio(), expandRegular(), and writeRPM().
int Fileno | ( | FD_t | fd | ) |
fileno(3) clone.
Definition at line 3639 of file rpmio.c.
References fdGetFILE.
Referenced by cpio_doio(), doScript(), fdSize(), main(), makeTempFile(), printSize(), rpmReadPackageFile(), rpmtsCallback(), ufdOpen(), writeFile(), and writeRPM().
FD_t Fopen | ( | const char * | path, | |
const char * | fmode | |||
) |
fopen(3) clone.
Definition at line 3504 of file rpmio.c.
References FDIO_s::close, DBGIO, FDIO_s::read, FDIO_s::seek, and FDIO_s::write.
Referenced by addFileToTagAux(), defaultMachine(), doReadRC(), fsmStage(), ftsStashLatest(), IDTXglob(), isSpecFile(), main(), makeGPGSignature(), makeHDRSignature(), makePGPSignature(), makeTempFile(), manageFile(), processPackageFiles(), readIcon(), readLineFromOFI(), readRPM(), rpmcliSign(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmGraph(), rpmHeaderFromFile(), rpmInstall(), rpmInstallSource(), rpmShowProgress(), rpmtsSolve(), rpmxpProcess(), urlGetFile(), and writeRPM().
size_t Fread | ( | void * | buf, | |
size_t | size, | |||
size_t | nmemb, | |||
FD_t | fd | |||
) |
fread(3) clone.
Definition at line 3142 of file rpmio.c.
References _FD_s::errcookie.
Referenced by copyFile(), cpio_copy(), defaultMachine(), doReadRC(), fsmStage(), isSpecFile(), main(), readFile(), readIcon(), readRPM(), rpmReadPackageFile(), ufdCopy(), and writeRPM().
int Fseek | ( | FD_t | fd, | |
_libio_off_t | offset, | |||
int | whence | |||
) |
const char* Fstrerror | ( | FD_t | fd | ) |
strerror(3) clone.
Definition at line 3131 of file rpmio.c.
References fdGetIo().
Referenced by copyFile(), cpio_copy(), doReadRC(), IDTXglob(), isSpecFile(), main(), manageFile(), processPackageFiles(), readFile(), readIcon(), readLead(), readLineFromOFI(), readRPM(), rpmcliSign(), rpmfd_Fopen(), rpmfd_init(), rpmgiOpen(), rpmGraph(), rpmInstall(), rpmInstallSource(), rpmReadPackageFile(), rpmReSign(), rpmShowProgress(), rpmtsSolve(), urlGetFile(), and writeRPM().
const char* const ftpStrerror | ( | int | errorNumber | ) |
Definition at line 693 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 doUntar(), ftpLogin(), ftpReq(), httpReq(), rpmInstall(), 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 3164 of file rpmio.c.
Referenced by copyFile(), cpio_copy(), fsmStage(), main(), rpmWriteSignature(), spewHeader(), ufdCopy(), writeLead(), and writeRPM().
int Glob | ( | const char * | pattern, | |
int | flags, | |||
int | errfunc(const char *epath, int eerrno), | |||
glob_t * | pglob | |||
) |
int Glob_error | ( | const char * | epath, | |
int | eerrno | |||
) |
int Glob_pattern_p | ( | const char * | pattern, | |
int | quote | |||
) |
glob_pattern_p(3) clone.
Definition at line 1403 of file rpmrpc.c.
References urlPath().
Referenced by initGlobs(), and rpmGlob().
void Globfree | ( | glob_t * | pglob | ) |
int Link | ( | const char * | oldpath, | |
const char * | newpath | |||
) |
link(2) clone.
Definition at line 231 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 fsmStage().
int Lstat | ( | const char * | path, | |
struct stat * | st | |||
) |
lstat(2) clone.
Definition at line 1309 of file rpmrpc.c.
Referenced by addFile(), checkOwners(), doUntar(), fsmStage(), Fts_open(), and rpmVerifyFile().
int Mkdir | ( | const char * | path, | |
mode_t | mode | |||
) |
mkdir(2) clone.
Definition at line 85 of file rpmrpc.c.
References 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 fsmStage(), packageBinaries(), and rpmMkdirPath().
DIR* Opendir | ( | const char * | path | ) |
struct dirent* Readdir | ( | DIR * | dir | ) | [read] |
int Readlink | ( | const char * | path, | |
char * | buf, | |||
size_t | bufsiz | |||
) |
readlink(2) clone.
Definition at line 1340 of file rpmrpc.c.
Referenced by fsmStage(), genCpioListAndHeader(), and rpmVerifyFile().
int Rename | ( | const char * | oldpath, | |
const char * | newpath | |||
) |
rename(2) clone.
Definition at line 176 of file rpmrpc.c.
References _rpmio_debug, 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 fsmStage().
int Rmdir | ( | const char * | path | ) |
rmdir(2) clone.
Definition at line 145 of file rpmrpc.c.
References 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 fsmStage().
char* rpmEscapeSpaces | ( | const char * | s | ) |
Escape isspace(3) characters in string.
s | string |
Definition at line 3667 of file rpmio.c.
Referenced by rpmgiGlobArgv(), and rpmInstall().
int rpmioMkpath | ( | const char * | path, | |
mode_t | mode, | |||
uid_t | uid, | |||
gid_t | gid | |||
) |
Insure that directories in path exist, creating as needed.
path | diretory path | |
mode | directory mode (if created) | |
uid | directory uid (if created), or -1 to skip | |
gid | directory uid (if created), or -1 to skip |
Definition at line 3692 of file rpmio.c.
References xmalloc().
Referenced by db3open(), and makeTempFile().
int Stat | ( | const char * | path, | |
struct stat * | st | |||
) |
stat(2) clone.
Definition at line 1278 of file rpmrpc.c.
References _rpmio_debug, 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 buildForTarget(), fsmStage(), Fts_open(), ftsStashLatest(), packageBinaries(), processSourceFiles(), and rpmMkdirPath().
int timedRead | ( | FD_t | fd, | |
void * | bufptr, | |||
int | length | |||
) |
Definition at line 1494 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().
void* ufdGetUrlinfo | ( | FD_t | fd | ) |
int Unlink | ( | const char * | path | ) |
unlink(2) clone.
Definition at line 279 of file rpmrpc.c.
References 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 buildForTarget(), buildSpec(), doRmSource(), doScript(), fsmStage(), rpmInstall(), urlGetFile(), and writeRPM().
const char* urlStrerror | ( | const char * | url | ) |
Definition at line 748 of file rpmio.c.
References errno, ftpStrerror(), urlinfo_s::openError, strerror, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, urlIsURL(), and urlSplit().
static int xisalnum | ( | int | c | ) | [inline, static] |
static int xisalpha | ( | int | c | ) | [inline, static] |
static int xisdigit | ( | int | c | ) | [inline, static] |
Definition at line 688 of file rpmio.h.
Referenced by defaultMachine(), getHostAddress(), parseEVR(), parseForDev(), parseFormat(), rdToken(), rpmds_ParseEVR(), rpmtsInitIterator(), and rpmvercmp().
static int xisupper | ( | int | c | ) | [inline, static] |
static int xtolower | ( | int | c | ) | [inline, static] |
Definition at line 701 of file rpmio.h.
References xisupper().
Referenced by myTagName(), tagName(), xstrcasecmp(), and xstrncasecmp().
Definition at line 2354 of file rpmio.c.
Referenced by fdbg(), ftpOpen(), httpOpen(), ufdOpen(), and urlConnect().