Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
849b0707
Commit
849b0707
authored
Feb 13, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment to explain why O_EXCL and O_TRUNC can be ignored in
openFlagsToCreateFileFlags() in certain cases.
parent
d1d3f4d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/port/open.c
src/port/open.c
+4
-1
No files found.
src/port/open.c
View file @
849b0707
...
...
@@ -6,7 +6,7 @@
*
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/port/open.c,v 1.1
8 2007/01/05 22:20:0
2 momjian Exp $
* $PostgreSQL: pgsql/src/port/open.c,v 1.1
9 2007/02/13 02:06:2
2 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -25,6 +25,7 @@ openFlagsToCreateFileFlags(int openFlags)
{
switch
(
openFlags
&
(
O_CREAT
|
O_TRUNC
|
O_EXCL
))
{
/* O_EXCL is meaningless without O_CREAT */
case
0
:
case
O_EXCL
:
return
OPEN_EXISTING
;
...
...
@@ -32,6 +33,7 @@ openFlagsToCreateFileFlags(int openFlags)
case
O_CREAT
:
return
OPEN_ALWAYS
;
/* O_EXCL is meaningless without O_CREAT */
case
O_TRUNC
:
case
O_TRUNC
|
O_EXCL
:
return
TRUNCATE_EXISTING
;
...
...
@@ -39,6 +41,7 @@ openFlagsToCreateFileFlags(int openFlags)
case
O_CREAT
|
O_TRUNC
:
return
CREATE_ALWAYS
;
/* O_TRUNC is meaningless with O_CREAT */
case
O_CREAT
|
O_EXCL
:
case
O_CREAT
|
O_TRUNC
|
O_EXCL
:
return
CREATE_NEW
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment