summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorhpa <hpa>2003-08-22 17:17:01 +0000
committerhpa <hpa>2003-08-22 17:17:01 +0000
commit4a3d76c721655e3ec1591a52e0424a10355f0655 (patch)
treeaacb9a35e14ce94d15560057bc7d408473d99549 /win32
parent4846a59ed0b70f7d307d03ae37f919021470636f (diff)
downloadsyslinux-4a3d76c721655e3ec1591a52e0424a10355f0655.tar.gz
Add functional equivalent to sync()
Diffstat (limited to 'win32')
-rw-r--r--win32/syslinux-mingw.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/win32/syslinux-mingw.c b/win32/syslinux-mingw.c
index 6ec5e961..eec0b00f 100644
--- a/win32/syslinux-mingw.c
+++ b/win32/syslinux-mingw.c
@@ -17,6 +17,10 @@
*
* To compile this install Cygwin with gcc, gcc-mingw, w32api,
* nasm, make and perl. Then build with: 'make syslinux.exe'
+ *
+ * TODO:
+ * * Test with harddrives. We might need to use \\.\PHYSICALDRIVEX
+ * instead of \\.\X: for these non removable devices.
*/
#include <varargs.h>
@@ -197,6 +201,12 @@ int main(int argc, char *argv[])
exit(1);
}
+ /* Now flush the media */
+ if(!FlushFileBuffers(f_handle)) {
+ error("FlushFileBuffers failed");
+ exit(1);
+ }
+
/* Close file */
CloseHandle(f_handle);
@@ -234,11 +244,15 @@ int main(int argc, char *argv[])
exit(1);
}
+ /* Now flush the media */
+ if(!FlushFileBuffers(f_handle)) {
+ error("FlushFileBuffers failed");
+ exit(1);
+ }
+
/* Close file */
CloseHandle(f_handle);
- /* TODO: flush device. Not really sure how */
-
/* Done! */
return 0;
}