15 #include <rpm/rpmtypes.h> 16 #include <rpm/rpmsw.h> 28 #if defined(__GLIBC__) && \ 29 (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) 30 #define USE_COOKIE_SEEK_POINTER 1 40 typedef const struct FDIO_s *
FDIO_t;
55 ssize_t
Fread(
void * buf,
size_t size,
size_t nmemb,
FD_t fd);
60 ssize_t
Fwrite(
const void * buf,
size_t size,
size_t nmemb,
FD_t fd);
65 int Fseek(
FD_t fd, _libio_off_t offset,
int whence);
127 FD_t fdLink (
void * cookie,
const char * msg);
int Fcntl(FD_t fd, int op, void *lip)
fcntl(2) clone.
off_t _libio_off_t
Hide libio API lossage.
const struct FDIO_s * FDIO_t
fdOpX_e
Identify per-desciptor I/O operation statistics.
struct _FD_s * FD_t
RPM IO file descriptor type.
int ufdCopy(FD_t sfd, FD_t tfd)
ssize_t timedRead(FD_t fd, void *bufptr, size_t length)
XXX the name is misleading, this is a legacy wrapper that ensures only S_ISREG() files are read...
const char * Fstrerror(FD_t fd)
strerror(3) clone.
off_t Ftell(FD_t fd)
ftell(3) clone.
int Fileno(FD_t fd)
fileno(3) clone.
FD_t fdLink(void *cookie, const char *msg)
ssize_t Fwrite(const void *buf, size_t size, size_t nmemb, FD_t fd)
fwrite(3) clone.
int Fflush(FD_t fd)
fflush(3) clone.
int fdWritable(FD_t fd, int secs)
FD_t fdNew(const char *msg)
FD_t Fdopen(FD_t ofd, const char *fmode)
ssize_t Fread(void *buf, size_t size, size_t nmemb, FD_t fd)
fread(3) clone.
int fdReadable(FD_t fd, int secs)
int Ferror(FD_t fd)
ferror(3) clone.
FD_t fdFree(FD_t fd, const char *msg)
enum fdOpX_e fdOpX
Identify per-desciptor I/O operation statistics.
int Fclose(FD_t fd)
fclose(3) clone.
FD_t Fopen(const char *path, const char *fmode)
fopen(3) clone.
Cumulative statistics for an operation.
FILE * fdGetFILE(FD_t fd)
Get associated FILE stream from fd (if any)
rpmop fdOp(FD_t fd, fdOpX opx)
int Fseek(FD_t fd, _libio_off_t offset, int whence)
fseek(3) clone.