summaryrefslogtreecommitdiff
path: root/util/nvramtool
diff options
context:
space:
mode:
authorZheng Bao <fishbaozi@gmail.com>2012-11-08 14:21:46 +0800
committerPatrick Georgi <patrick@georgi-clan.de>2012-11-14 09:24:56 +0100
commitf6659cac3b764e8a2f4ced7b7058240f06734a20 (patch)
tree1b53b84e0dd1a22fa67ac8e95b5fbcafc5f753e6 /util/nvramtool
parent431a8160194a1c43c340fbf14ad4e94319bd159e (diff)
downloadcoreboot-f6659cac3b764e8a2f4ced7b7058240f06734a20.tar.xz
nvramtool: fsync for mingw.
Change-Id: Ifdec69ca46ba8cbd3eb154d8f4af4b3cafa8019d Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/1805 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'util/nvramtool')
-rw-r--r--util/nvramtool/cli/nvramtool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/nvramtool/cli/nvramtool.c b/util/nvramtool/cli/nvramtool.c
index 7716bd8710..76d5cbb678 100644
--- a/util/nvramtool/cli/nvramtool.c
+++ b/util/nvramtool/cli/nvramtool.c
@@ -45,6 +45,9 @@
#include "reg_expr.h"
#include "hexdump.h"
#include "cbfs.h"
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
typedef void (*op_fn_t) (void);
@@ -168,6 +171,8 @@ int main(int argc, char *argv[])
}
#ifndef __MINGW32__
fsync(fd);
+#else
+ FlushFileBuffers ((HANDLE) _get_osfhandle (fd));
#endif
}