add O_EXLOCK, O_SHLOCK to open falgs
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 16 May 1992 07:18:01 +0000 (23:18 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Sat, 16 May 1992 07:18:01 +0000 (23:18 -0800)
SCCS-vsn: lib/libc/db/hash/hash.c 5.23

usr/src/lib/libc/db/hash/hash.c

index 7909fdd..927b624 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash.c     5.22 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash.c     5.23 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -85,8 +85,8 @@ __hash_open(file, flags, mode, info)
         * But, the field in the hashp structure needs to be accurate so that
         * we can check accesses.
         */
         * But, the field in the hashp structure needs to be accurate so that
         * we can check accesses.
         */
-       hashp->flags = flags =
-           flags & (O_CREAT | O_EXCL | O_RDONLY | O_RDWR | O_TRUNC | O_WRONLY);
+       hashp->flags = flags = flags & (O_CREAT | O_EXCL | O_EXLOCK | 
+           O_RDONLY | O_RDWR | O_SHLOCK | O_TRUNC | O_WRONLY);
        if (flags & O_WRONLY)
                flags = (flags & ~O_WRONLY) | O_RDWR;
 
        if (flags & O_WRONLY)
                flags = (flags & ~O_WRONLY) | O_RDWR;