diff options
Diffstat (limited to 'win32/syslinux-mingw.c')
-rw-r--r-- | win32/syslinux-mingw.c | 18 |
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; } |