Change the file mode argument to dbopen() and the db backends from int to

mode_t.
This commit is contained in:
kleink 1998-05-07 19:24:20 +00:00
parent 9eb0e33ef6
commit 23a9b2c5c9
6 changed files with 26 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db.h,v 1.13 1994/10/26 00:55:48 cgd Exp $ */
/* $NetBSD: db.h,v 1.14 1998/05/07 19:24:20 kleink Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -222,12 +222,12 @@ typedef struct {
#endif
__BEGIN_DECLS
DB *dbopen __P((const char *, int, int, DBTYPE, const void *));
DB *dbopen __P((const char *, int, mode_t, DBTYPE, const void *));
#ifdef __DBINTERFACE_PRIVATE
DB *__bt_open __P((const char *, int, int, const BTREEINFO *, int));
DB *__hash_open __P((const char *, int, int, const HASHINFO *, int));
DB *__rec_open __P((const char *, int, int, const RECNOINFO *, int));
DB *__bt_open __P((const char *, int, mode_t, const BTREEINFO *, int));
DB *__hash_open __P((const char *, int, mode_t, const HASHINFO *, int));
DB *__rec_open __P((const char *, int, mode_t, const RECNOINFO *, int));
void __dbpanic __P((DB *dbp));
#endif
__END_DECLS

View File

@ -1,4 +1,4 @@
/* $NetBSD: bt_open.c,v 1.11 1998/04/07 10:40:21 fair Exp $ */
/* $NetBSD: bt_open.c,v 1.12 1998/05/07 19:24:20 kleink Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)bt_open.c 8.10 (Berkeley) 8/17/94";
#else
__RCSID("$NetBSD: bt_open.c,v 1.11 1998/04/07 10:40:21 fair Exp $");
__RCSID("$NetBSD: bt_open.c,v 1.12 1998/05/07 19:24:20 kleink Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -98,8 +98,10 @@ static int tmp __P((void));
DB *
__bt_open(fname, flags, mode, openinfo, dflags)
const char *fname;
int flags, mode, dflags;
int flags;
mode_t mode;
const BTREEINFO *openinfo;
int dflags;
{
struct stat sb;
BTMETA m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db.c,v 1.9 1997/07/21 14:06:39 jtc Exp $ */
/* $NetBSD: db.c,v 1.10 1998/05/07 19:24:21 kleink Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94";
#else
__RCSID("$NetBSD: db.c,v 1.9 1997/07/21 14:06:39 jtc Exp $");
__RCSID("$NetBSD: db.c,v 1.10 1998/05/07 19:24:21 kleink Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -60,7 +60,8 @@ __weak_alias(dbopen,_dbopen);
DB *
dbopen(fname, flags, mode, type, openinfo)
const char *fname;
int flags, mode;
int flags;
mode_t mode;
DBTYPE type;
const void *openinfo;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: hash.c,v 1.11 1997/07/13 18:52:02 christos Exp $ */
/* $NetBSD: hash.c,v 1.12 1998/05/07 19:24:21 kleink Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#else
__RCSID("$NetBSD: hash.c,v 1.11 1997/07/13 18:52:02 christos Exp $");
__RCSID("$NetBSD: hash.c,v 1.12 1998/05/07 19:24:21 kleink Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -102,8 +102,10 @@ int hash_accesses, hash_collisions, hash_expansions, hash_overflows;
extern DB *
__hash_open(file, flags, mode, info, dflags)
const char *file;
int flags, mode, dflags;
int flags;
mode_t mode;
const HASHINFO *info; /* Special directives for create */
int dflags;
{
HTAB *hashp;
struct stat statbuf;

View File

@ -1,4 +1,4 @@
.\" $NetBSD: dbopen.3,v 1.7 1997/11/14 02:04:36 mrg Exp $
.\" $NetBSD: dbopen.3,v 1.8 1998/05/07 19:24:21 kleink Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -45,7 +45,7 @@ dbopen, db \- database access methods
#include <db.h>
DB *
dbopen(const char *file, int flags, int mode, DBTYPE type,
dbopen(const char *file, int flags, mode_t mode, DBTYPE type,
.ti +5
const void *openinfo);
.ft R

View File

@ -1,4 +1,4 @@
/* $NetBSD: rec_open.c,v 1.10 1998/02/20 09:27:20 mycroft Exp $ */
/* $NetBSD: rec_open.c,v 1.11 1998/05/07 19:24:21 kleink Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)rec_open.c 8.10 (Berkeley) 9/1/94";
#else
__RCSID("$NetBSD: rec_open.c,v 1.10 1998/02/20 09:27:20 mycroft Exp $");
__RCSID("$NetBSD: rec_open.c,v 1.11 1998/05/07 19:24:21 kleink Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -63,8 +63,10 @@ __RCSID("$NetBSD: rec_open.c,v 1.10 1998/02/20 09:27:20 mycroft Exp $");
DB *
__rec_open(fname, flags, mode, openinfo, dflags)
const char *fname;
int flags, mode, dflags;
int flags;
mode_t mode;
const RECNOINFO *openinfo;
int dflags;
{
BTREE *t;
BTREEINFO btopeninfo;