From: Vladimir 'phcoder' Serbinenko Date: Tue, 15 Oct 2013 13:06:20 +0000 (+0200) Subject: * grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: Really X-Git-Tag: grub-2.02-beta1~690 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af3b06be1489c394525671facc03e6921f426b6f;p=thirdparty%2Fgrub.git * grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: Really implement fsync. --- diff --git a/ChangeLog b/ChangeLog index 6d2de5c56..4e7e4d982 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-15 Vladimir Serbinenko + + * grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: Really + implement fsync. + 2013-10-15 Vladimir Serbinenko * configure.ac: Check for nvlist_lookup_string in nvpair since we diff --git a/grub-core/osdep/windows/hostdisk.c b/grub-core/osdep/windows/hostdisk.c index f0318faf8..539ff7a15 100644 --- a/grub-core/osdep/windows/hostdisk.c +++ b/grub-core/osdep/windows/hostdisk.c @@ -422,8 +422,11 @@ grub_util_fopen (const char *path, const char *mode) return ret; } -int fsync (int fno __attribute__ ((unused))) +int fsync (int fno) { + HANDLE hnd; + hnd = _get_osfhandle (fno); + FlushFileBuffers (hnd); return 0; }