37 #if defined(LIBC_SCCS) && !defined(lint) 38 static char sccsid[] =
"@(#)rec_open.c 8.10 (Berkeley) 9/1/94";
41 #include <sys/types.h> 52 #include "../include/db.h" 69 if (fname !=
NULL && (rfd = open(fname, flags, mode)) < 0)
82 btopeninfo.compare =
NULL;
83 btopeninfo.prefix =
NULL;
86 O_RDWR, S_IRUSR | S_IWUSR, &btopeninfo,
dflags);
123 if (lseek(rfd, (off_t)0, SEEK_CUR) == -1 &&
errno == ESPIPE) {
124 switch (flags & O_ACCMODE) {
131 slow:
if ((t->
bt_rfp = fdopen(rfd,
"r")) ==
NULL)
137 switch (flags & O_ACCMODE) {
161 #ifdef MMAP_NOT_AVAILABLE 171 PROT_READ, MAP_PRIVATE, rfd,
172 (off_t)0)) == MAP_FAILED
211 einval:
errno = EINVAL;
212 err: sverrno =
errno;
int __rec_fpipe(BTREE *t, recno_t top)
int mpool_put(MPOOL *mp, void *page, u_int flags)
int __rec_fmap(BTREE *t, recno_t top)
void * mpool_get(MPOOL *mp, pgno_t pgno, u_int flags)
int __rec_seq(DB *dbp, DBT *key, DBT *data, u_int flags) const
DB * __bt_open(char *fname, int flags, int mode, const BTREEINFO *openinfo, int dflags) const
int __rec_vmap(BTREE *t, recno_t top)
DB * __rec_open(char *fname, int flags, int mode, const RECNOINFO *openinfo, int dflags) const
int __rec_vpipe(BTREE *t, recno_t top)
int __rec_sync(DB *dbp, u_int flags) const
int __rec_fd(DB *dbp) const
int __rec_get(DB *dbp, const DBT *key, DBT *data, u_int flags) const
int __rec_put(DB *dbp, DBT *key, const DBT *data, u_int flags) const
int __rec_delete(DB *dbp, const DBT *key, u_int flags) const