]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: Really
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 13:06:20 +0000 (15:06 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 15 Oct 2013 13:06:20 +0000 (15:06 +0200)
implement fsync.

ChangeLog
grub-core/osdep/windows/hostdisk.c

index 6d2de5c562b41744fa0fad428a4bf7f13c071fdd..4e7e4d982bd14fb986ad9c3a4bc8ee888c3fc652 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/osdep/windows/hostdisk.c (fsync) [__MINGW32__]: Really
+       implement fsync.
+
 2013-10-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Check for nvlist_lookup_string in nvpair since we
index f0318faf8b83a7ea7fa4c412060c11a7d20ca6dc..539ff7a15025a936b236aab092bc4526849cbb31 100644 (file)
@@ -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;
 }