Commit 5675ef27 authored by Tudor Bosman's avatar Tudor Bosman Committed by Jordan DeLong

Add various functions to wrapNoInt

Test Plan: used them

Reviewed By: soren@fb.com

FB internal diff: D976393
parent c63b363e
......@@ -21,6 +21,7 @@
#include <fcntl.h>
#endif
#include <sys/file.h>
#include <sys/socket.h>
#include "folly/detail/FileUtilDetail.h"
......@@ -53,6 +54,14 @@ int fsyncNoInt(int 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) {
#if defined(__APPLE__)
return wrapNoInt(fcntl, fd, F_FULLFSYNC);
......@@ -75,6 +84,10 @@ int flockNoInt(int fd, int 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) {
return wrapNoInt(read, fd, buf, count);
}
......
......@@ -35,11 +35,14 @@ namespace folly {
*/
int openNoInt(const char* name, int flags, mode_t mode=0644);
int closeNoInt(int fd);
int dupNoInt(int fd);
int dup2NoInt(int oldfd, int newfd);
int fsyncNoInt(int fd);
int fdatasyncNoInt(int fd);
int ftruncateNoInt(int fd, off_t len);
int truncateNoInt(const char* path, off_t len);
int flockNoInt(int fd, int operation);
int shutdownNoInt(int fd, int how);
ssize_t readNoInt(int fd, void* buf, size_t n);
ssize_t preadNoInt(int fd, void* buf, size_t n, off_t offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment