aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-02-24 12:16:50 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-02-24 12:16:50 +0000
commit5954eadf6741e0b4cdab23c414d7a6b470cd06db (patch)
treec3cee2f30bc1a212d1563448dbde1db9efcb388f /src/libutil/util.cc
parentbb82310dba8a70b539122db20712fbd8fd9e840e (diff)
* Remove the fdatasync check since it's no longer needed.
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 8c52625a2..3f76be670 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -227,13 +227,12 @@ string readFile(const Path & path)
}
-void writeFile(const Path & path, const string & s, bool doFsync)
+void writeFile(const Path & path, const string & s)
{
AutoCloseFD fd = open(path.c_str(), O_WRONLY | O_TRUNC | O_CREAT, 0666);
if (fd == -1)
throw SysError(format("opening file `%1%'") % path);
writeFull(fd, (unsigned char *) s.c_str(), s.size());
- if (doFsync) fdatasync(fd);
}