aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2014-05-08 20:57:07 +0900
committerGravatar David Bremner <david@tethera.net>2014-05-18 06:31:15 +0900
commitf3ee655b493c7e57621226a98abc9e9db5d0cb27 (patch)
tree2146f16c3c962aa877c0b61e0d0cfce22169af4a
parentf6b54fbcf6860e687b5b058810c1d17622dbab23 (diff)
notmuch-dump: use fsync instead of fdatasync
Since the file size will have changed, there is no performance benefit to calling fdatasync. Somewhat surprisingly, using fdatasync apparently causes portability problems on FreeBSD.
-rw-r--r--notmuch-dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/notmuch-dump.c b/notmuch-dump.c
index 2849eaba..887a2082 100644
--- a/notmuch-dump.c
+++ b/notmuch-dump.c
@@ -169,7 +169,7 @@ notmuch_database_dump (notmuch_database_t *notmuch,
}
if (output_file_name) {
- ret = fdatasync (outfd);
+ ret = fsync (outfd);
if (ret) {
fprintf (stderr, "Error syncing %s to disk: %s\n",
name_for_error, strerror (errno));