summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-09-12 08:50:16 -0600
committerJens Axboe <axboe@kernel.dk>2018-09-12 08:50:16 -0600
commitbae743b1ed1fb245ace451f81baa0949def35814 (patch)
tree9e31be8f98a77b5cf9832d1da829b2cd5381dee9 /os
parente8ed50bc3ce67f449714c55c3fbf2f8eb50730c2 (diff)
downloadfio-bae743b1ed1fb245ace451f81baa0949def35814.tar.gz
fio-bae743b1ed1fb245ace451f81baa0949def35814.tar.bz2
windows: make win_to_posix_error() more resilient
If we pass in ERROR_SUCCESS, we should get a zero back. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os')
-rw-r--r--os/windows/posix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c
index 5b72beab..fd1d5582 100644
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -35,6 +35,8 @@ HRESULT WINAPI StringCchPrintfA(char *pszDest, size_t cchDest, const char *pszFo
int win_to_posix_error(DWORD winerr)
{
switch (winerr) {
+ case ERROR_SUCCESS:
+ return 0;
case ERROR_FILE_NOT_FOUND:
return ENOENT;
case ERROR_PATH_NOT_FOUND: