[libvirt] [PATCH 1/3] build: storage: fdatasync() is not supported in Mac OS X.
Peter Krempa
pkrempa at redhat.com
Fri Sep 16 12:14:14 UTC 2011
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
More information about the libvir-list
mailing list