[PATCH 1/3] build: storage: fdatasync() is not supported in Mac OS X.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch changes fdatasync() to fsync() to compile cleanly in OS X.
---
 src/storage/storage_backend.c |    2 +-
 src/storage/storage_driver.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index d125504..ee39836 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -208,7 +208,7 @@ virStorageBackendCopyToFD(virStorageVolDefPtr vol,
         } while ((amtleft -= interval) > 0);
     }

-    if (fdatasync(fd) < 0) {
+    if (fsync(fd) < 0) {
         ret = -errno;
         virReportSystemError(errno, _("cannot sync data to file '%s'"),
                              vol->target.path);
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index c05b74e..aea4c71 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -1783,7 +1783,7 @@ storageWipeExtent(virStorageVolDefPtr vol,
         remaining -= written;
     }

-    if (fdatasync(fd) < 0) {
+    if (fsync(fd) < 0) {
         ret = -errno;
         virReportSystemError(errno,
                              _("cannot sync data to volume with path '%s'"),
-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]