mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
src: use g_fsync for portability
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>
This commit is contained in:
parent
41d9bba57e
commit
dac174ee07
@ -1772,7 +1772,7 @@ virNWFilterSnoopLeaseFileWrite(int lfd, const char *ifkey,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ignore_value(fsync(lfd));
|
||||
ignore_value(g_fsync(lfd));
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(lbuf);
|
||||
|
@ -384,7 +384,7 @@ createRawFile(int fd, virStorageVolDefPtr vol,
|
||||
}
|
||||
}
|
||||
|
||||
if (fsync(fd) < 0) {
|
||||
if (g_fsync(fd) < 0) {
|
||||
ret = -errno;
|
||||
virReportSystemError(errno, _("cannot sync data to file '%s'"),
|
||||
vol->target.path);
|
||||
|
@ -519,7 +519,7 @@ virFileRewrite(const char *path,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (fsync(fd) < 0) {
|
||||
if (g_fsync(fd) < 0) {
|
||||
virReportSystemError(errno, _("cannot sync file '%s'"),
|
||||
newfile);
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user