Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nocache
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Danil Mikhailov
nocache
Commits
43c71e1a
Commit
43c71e1a
authored
Feb 04, 2012
by
Julius Plenz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync_if_writable() now correctly checks O_ACCMODE
parent
e15e0a9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fcntl_helpers.c
fcntl_helpers.c
+2
-2
No files found.
fcntl_helpers.c
View file @
43c71e1a
...
...
@@ -12,8 +12,8 @@ int fadv_dontneed(int fd, off_t offset, off_t len)
void
sync_if_writable
(
int
fd
)
{
int
r
;
if
((
r
=
fcntl
(
fd
,
F_GETFL
,
0
))
==
-
1
)
if
((
r
=
fcntl
(
fd
,
F_GETFL
))
==
-
1
)
return
;
if
(
!
(
r
&
O_RDONLY
)
)
if
(
(
r
&
O_ACCMODE
)
!=
O_RDONLY
)
fdatasync
(
fd
);
}
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