rpm: rpmio.h Source File

rpm 4.11.2-rc1

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

- File List
- Globals

rpmio.h
Go to the documentation of this file.
1 #ifndef H_RPMIO
2 #define H_RPMIO
3
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <unistd.h>
14
15 #include <rpm/rpmtypes.h>
16 #include <rpm/rpmsw.h>
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
24 typedef const struct FDIO_s * FDIO_t;
25
26
34 const char * Fstrerror(FD_t fd);
35
39 ssize_t Fread(void * buf, size_t size, size_t nmemb, FD_t fd);
40
44 ssize_t Fwrite(const void * buf, size_t size, size_t nmemb, FD_t fd);
45
49 int Fseek(FD_t fd, off_t offset, int whence);
50
54 off_t Ftell(FD_t fd);
55
59 int Fclose( FD_t fd);
60
63 FD_t Fdopen(FD_t ofd, const char * fmode);
64
68 FD_t Fopen(const char * path,
69 const char * fmode);
70
71
75 int Fflush(FD_t fd);
76
80 int Ferror(FD_t fd);
81
85 int Fileno(FD_t fd);
86
90 int Fcntl(FD_t fd, int op, void *lip);
91
95 const char * Fdescr(FD_t fd);
96
103 off_t fdSize(FD_t fd);
104
107 FD_t fdDup(int fdno);
108
111 FD_t fdLink(FD_t fd);
112
115 FD_t fdFree(FD_t fd);
116
119 off_t ufdCopy(FD_t sfd, FD_t tfd);
120
124 typedef enum fdOpX_e {
125 FDSTAT_READ = 0,
126 FDSTAT_WRITE = 1,
127 FDSTAT_SEEK = 2,
128 FDSTAT_CLOSE = 3,
129 FDSTAT_DIGEST = 4,
130 FDSTAT_MAX = 5
131 } fdOpX;
132
136 rpmop fdOp(FD_t fd, fdOpX opx);
137
138 #ifdef __cplusplus
139 }
140 #endif
141
142 #endif /* H_RPMIO */
Fdescr
const char * Fdescr(FD_t fd)
Get informative description (eg file name) from fd for diagnostic output.
fdSize
off_t fdSize(FD_t fd)
FDSTAT_SEEK
Definition: rpmio.h:127
FDSTAT_MAX
Definition: rpmio.h:130
Fileno
int Fileno(FD_t fd)
fileno(3) clone.
fdOpX
enum fdOpX_e fdOpX
Identify per-desciptor I/O operation statistics.
fdOp
rpmop fdOp(FD_t fd, fdOpX opx)
fdFree
FD_t fdFree(FD_t fd)
Fread
ssize_t Fread(void *buf, size_t size, size_t nmemb, FD_t fd)
fread(3) clone.
Fflush
int Fflush(FD_t fd)
fflush(3) clone.
FDIO_t
const struct FDIO_s * FDIO_t
Definition: rpmio.h:24
FD_t
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:95
Fseek
int Fseek(FD_t fd, off_t offset, int whence)
fseek(3) clone.
Fwrite
ssize_t Fwrite(const void *buf, size_t size, size_t nmemb, FD_t fd)
fwrite(3) clone.
Fdopen
FD_t Fdopen(FD_t ofd, const char *fmode)
ufdCopy
off_t ufdCopy(FD_t sfd, FD_t tfd)
rpmop_s
Cumulative statistics for an operation.
Definition: rpmsw.h:40
Ftell
off_t Ftell(FD_t fd)
ftell(3) clone.
FDSTAT_WRITE
Definition: rpmio.h:126
fdLink
FD_t fdLink(FD_t fd)
Fstrerror
const char * Fstrerror(FD_t fd)
strerror(3) clone.
fdOpX_e
fdOpX_e
Identify per-desciptor I/O operation statistics.
Definition: rpmio.h:124
fdDup
FD_t fdDup(int fdno)
FDSTAT_READ
Definition: rpmio.h:125
Fopen
FD_t Fopen(const char *path, const char *fmode)
fopen(3) clone.
FDSTAT_CLOSE
Definition: rpmio.h:128
Fcntl
int Fcntl(FD_t fd, int op, void *lip)
fcntl(2) clone.
FDSTAT_DIGEST
Definition: rpmio.h:129
Ferror
int Ferror(FD_t fd)
ferror(3) clone.
Fclose
int Fclose(FD_t fd)
fclose(3) clone.