add O_EXLOCK and O_SHLOCK to open flags
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 16 May 1992 07:19:08 +0000 (23:19 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 16 May 1992 07:19:08 +0000 (23:19 -0800)
SCCS-vsn: lib/libc/db/man/dbopen.3 5.21
SCCS-vsn: lib/libc/db/btree/bt_open.c 5.17

usr/src/lib/libc/db/btree/bt_open.c
usr/src/lib/libc/db/man/dbopen.3

index 32e46a9..6bb70c4 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_open.c  5.16 (Berkeley) %G%";
+static char sccsid[] = "@(#)bt_open.c  5.17 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -148,7 +148,8 @@ __bt_open(fname, flags, mode, openinfo)
         * open a backing temporary file.  Otherwise, it's a disk-based tree.
         */
        if (fname) {
         * open a backing temporary file.  Otherwise, it's a disk-based tree.
         */
        if (fname) {
-#define        USEFLAGS        (O_CREAT|O_EXCL|O_RDONLY|O_RDWR|O_TRUNC|O_WRONLY)
+#define        USEFLAGS \
+       (O_CREAT|O_EXCL|O_EXLOCK|O_RDONLY|O_RDWR|O_SHLOCK|O_TRUNC|O_WRONLY)
                if ((t->bt_fd = open(fname, flags & USEFLAGS, mode)) < 0)
                        goto err;
                if ((flags & O_ACCMODE) == O_RDONLY)
                if ((t->bt_fd = open(fname, flags & USEFLAGS, mode)) < 0)
                        goto err;
                if ((flags & O_ACCMODE) == O_RDONLY)
index 34e820f..aa8f14a 100644 (file)
@@ -3,7 +3,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)dbopen.3    5.20 (Berkeley) %G%
+.\"    @(#)dbopen.3    5.21 (Berkeley) %G%
 .\"
 .TH DBOPEN 3 ""
 .UC 7
 .\"
 .TH DBOPEN 3 ""
 .UC 7
@@ -49,8 +49,8 @@ and
 .I mode arguments
 are as specified to the
 .IR open (2)
 .I mode arguments
 are as specified to the
 .IR open (2)
-routine, however, only the O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC
-and O_WRONLY flags are meaningful.
+routine, however, only the O_CREAT, O_EXCL, O_EXLOCK, O_RDONLY, O_RDWR,
+O_SHLOCK, O_TRUNC and O_WRONLY flags are meaningful.
 .PP
 The
 .I type
 .PP
 The
 .I type