aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Fu <vincent.fu@samsung.com>2023-09-14 18:54:25 -0400
committerVincent Fu <vincent.fu@samsung.com>2023-09-14 18:54:25 -0400
commite2c5f17e3559cc7c96706cd75c2609f12675c60b (patch)
tree1c04961d4c2c590efd7ac5628a87c84a01844755
parente4a9812dee084b058eca6ebde9634a3d573a0079 (diff)
downloadfio-e2c5f17e3559cc7c96706cd75c2609f12675c60b.tar.gz
verify: open state file in binary mode on Windows
Make sure we open the verify state file in binary mode to avoid any possible conversion of NL to CR+NL. This is the same fix we did for 1fb215e991d260a128e35d761f6850e8d9e4c333. Fixes: https://github.com/axboe/fio/issues/1631 Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
-rw-r--r--verify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/verify.c b/verify.c
index 2848b6861..f7355f302 100644
--- a/verify.c
+++ b/verify.c
@@ -1648,6 +1648,10 @@ static int open_state_file(const char *name, const char *prefix, int num,
else
flags = O_RDONLY;
+#ifdef _WIN32
+ flags |= O_BINARY;
+#endif
+
verify_state_gen_name(out, sizeof(out), name, prefix, num);
fd = open(out, flags, 0644);