The g_fsync() API provides the same Windows portability
as GNULIB does for fsync().
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
goto cleanup;
}
- ignore_value(fsync(lfd));
+ ignore_value(g_fsync(lfd));
cleanup:
VIR_FREE(lbuf);
}
}
- if (fsync(fd) < 0) {
+ if (g_fsync(fd) < 0) {
ret = -errno;
virReportSystemError(errno, _("cannot sync data to file '%s'"),
vol->target.path);
goto cleanup;
}
- if (fsync(fd) < 0) {
+ if (g_fsync(fd) < 0) {
virReportSystemError(errno, _("cannot sync file '%s'"),
newfile);
goto cleanup;