From aa0a656977742d967cc743be6245f50669c08380 Mon Sep 17 00:00:00 2001 From: Tudor Bosman Date: Sat, 11 May 2013 14:35:43 -0700 Subject: [PATCH] Add fsyncNoInt, fdatasyncNoInt Test Plan: compiled file_util_test Reviewed By: soren@fb.com FB internal diff: D809250 --- folly/FileUtil.cpp | 8 ++++++++ folly/FileUtil.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/folly/FileUtil.cpp b/folly/FileUtil.cpp index 2d4573dc..690280b9 100644 --- a/folly/FileUtil.cpp +++ b/folly/FileUtil.cpp @@ -41,6 +41,14 @@ int closeNoInt(int fd) { return r; } +int fsyncNoInt(int fd) { + return wrapNoInt(fsync, fd); +} + +int fdatasyncNoInt(int fd) { + return wrapNoInt(fdatasync, fd); +} + ssize_t readNoInt(int fd, void* buf, size_t count) { return wrapNoInt(read, fd, buf, count); } diff --git a/folly/FileUtil.h b/folly/FileUtil.h index 9d65bf53..67e19213 100644 --- a/folly/FileUtil.h +++ b/folly/FileUtil.h @@ -31,6 +31,8 @@ namespace folly { * semantics of underlying system calls. */ int closeNoInt(int fd); +int fsyncNoInt(int fd); +int fdatasyncNoInt(int fd); ssize_t readNoInt(int fd, void* buf, size_t n); ssize_t preadNoInt(int fd, void* buf, size_t n, off_t offset); -- 2.34.1