Bugzilla bug 266327: support PR_EXCL in _MD_open for BeOS. The patch is
authorwchang0222%aol.com
Thu, 18 Nov 2004 22:32:47 +0000
changeset 3216 3045368f00acddd1fe657d82342e383de9d84ec2
parent 3215 109e4019e61e5291caeb0075889ddca38578315d
child 3218 873fa624e4af672a37111fa4237110883c7ab88b
push idunknown
push userunknown
push dateunknown
bugs266327
Bugzilla bug 266327: support PR_EXCL in _MD_open for BeOS. The patch is contributed by Niels Reedijk <Niels.Reedijk@gmail.com>. r=simontaylor2,wtc.
pr/src/md/beos/bfile.c
--- a/pr/src/md/beos/bfile.c
+++ b/pr/src/md/beos/bfile.c
@@ -168,26 +168,28 @@ PRInt32
 	if (flags & PR_RDWR) {
 		osflags = O_RDWR;
 	} else if (flags & PR_WRONLY) {
 		osflags = O_WRONLY;
 	} else {
 		osflags = O_RDONLY;
 	}
 
-        if (flags & PR_APPEND)
-                osflags |= O_APPEND;
-        if (flags & PR_TRUNCATE)
-                osflags |= O_TRUNC;
-        if (flags & PR_SYNC) {
+	if (flags & PR_EXCL)
+		osflags |= O_EXCL;
+	if (flags & PR_APPEND)
+		osflags |= O_APPEND;
+	if (flags & PR_TRUNCATE)
+		osflags |= O_TRUNC;
+	if (flags & PR_SYNC) {
 /* Ummmm.  BeOS doesn't appear to
    support sync in any way shape or
    form. */
 		return PR_NOT_IMPLEMENTED_ERROR;
-        }
+	}
 
 	/*
 	** On creations we hold the 'create' lock in order to enforce
 	** the semantics of PR_Rename. (see the latter for more details)
 	*/
 	if (flags & PR_CREATE_FILE)
 	{
 		osflags |= O_CREAT ;