From db21c045d22f1f5295b05f647c87144d1a782ca8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 27 Feb 2015 11:04:25 +0100 Subject: [PATCH] xbps-create(8): use fdatasync() rather than fsync(). The latter could be too expensive, and we only care for the data to be written to the binary package because a bit later we rename() the temporary file, which will ensure a data flush to disk. --- bin/xbps-create/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index 5f2e1017..4544fac5 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -895,7 +895,7 @@ main(int argc, char **argv) */ binpkg = xbps_xasprintf("%s.%s.xbps", pkgver, arch); - (void)fsync(pkg_fd); + (void)fdatasync(pkg_fd); myumask = umask(0); (void)umask(myumask);