Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
folly
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
Libraries
folly
Commits
5675ef27
Commit
5675ef27
authored
Sep 18, 2013
by
Tudor Bosman
Committed by
Jordan DeLong
Sep 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add various functions to wrapNoInt
Test Plan: used them Reviewed By: soren@fb.com FB internal diff: D976393
parent
c63b363e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
folly/FileUtil.cpp
folly/FileUtil.cpp
+13
-0
folly/FileUtil.h
folly/FileUtil.h
+3
-0
No files found.
folly/FileUtil.cpp
View file @
5675ef27
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <fcntl.h>
#include <fcntl.h>
#endif
#endif
#include <sys/file.h>
#include <sys/file.h>
#include <sys/socket.h>
#include "folly/detail/FileUtilDetail.h"
#include "folly/detail/FileUtilDetail.h"
...
@@ -53,6 +54,14 @@ int fsyncNoInt(int fd) {
...
@@ -53,6 +54,14 @@ int fsyncNoInt(int fd) {
return
wrapNoInt
(
fsync
,
fd
);
return
wrapNoInt
(
fsync
,
fd
);
}
}
int
dupNoInt
(
int
fd
)
{
return
wrapNoInt
(
dup
,
fd
);
}
int
dup2NoInt
(
int
oldfd
,
int
newfd
)
{
return
wrapNoInt
(
dup2
,
oldfd
,
newfd
);
}
int
fdatasyncNoInt
(
int
fd
)
{
int
fdatasyncNoInt
(
int
fd
)
{
#if defined(__APPLE__)
#if defined(__APPLE__)
return
wrapNoInt
(
fcntl
,
fd
,
F_FULLFSYNC
);
return
wrapNoInt
(
fcntl
,
fd
,
F_FULLFSYNC
);
...
@@ -75,6 +84,10 @@ int flockNoInt(int fd, int operation) {
...
@@ -75,6 +84,10 @@ int flockNoInt(int fd, int operation) {
return
wrapNoInt
(
flock
,
fd
,
operation
);
return
wrapNoInt
(
flock
,
fd
,
operation
);
}
}
int
shutdownNoInt
(
int
fd
,
int
how
)
{
return
wrapNoInt
(
shutdown
,
fd
,
how
);
}
ssize_t
readNoInt
(
int
fd
,
void
*
buf
,
size_t
count
)
{
ssize_t
readNoInt
(
int
fd
,
void
*
buf
,
size_t
count
)
{
return
wrapNoInt
(
read
,
fd
,
buf
,
count
);
return
wrapNoInt
(
read
,
fd
,
buf
,
count
);
}
}
...
...
folly/FileUtil.h
View file @
5675ef27
...
@@ -35,11 +35,14 @@ namespace folly {
...
@@ -35,11 +35,14 @@ namespace folly {
*/
*/
int
openNoInt
(
const
char
*
name
,
int
flags
,
mode_t
mode
=
0644
);
int
openNoInt
(
const
char
*
name
,
int
flags
,
mode_t
mode
=
0644
);
int
closeNoInt
(
int
fd
);
int
closeNoInt
(
int
fd
);
int
dupNoInt
(
int
fd
);
int
dup2NoInt
(
int
oldfd
,
int
newfd
);
int
fsyncNoInt
(
int
fd
);
int
fsyncNoInt
(
int
fd
);
int
fdatasyncNoInt
(
int
fd
);
int
fdatasyncNoInt
(
int
fd
);
int
ftruncateNoInt
(
int
fd
,
off_t
len
);
int
ftruncateNoInt
(
int
fd
,
off_t
len
);
int
truncateNoInt
(
const
char
*
path
,
off_t
len
);
int
truncateNoInt
(
const
char
*
path
,
off_t
len
);
int
flockNoInt
(
int
fd
,
int
operation
);
int
flockNoInt
(
int
fd
,
int
operation
);
int
shutdownNoInt
(
int
fd
,
int
how
);
ssize_t
readNoInt
(
int
fd
,
void
*
buf
,
size_t
n
);
ssize_t
readNoInt
(
int
fd
,
void
*
buf
,
size_t
n
);
ssize_t
preadNoInt
(
int
fd
,
void
*
buf
,
size_t
n
,
off_t
offset
);
ssize_t
preadNoInt
(
int
fd
,
void
*
buf
,
size_t
n
,
off_t
offset
);
...
...
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