projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e8ed50b
)
windows: make win_to_posix_error() more resilient
author
Jens Axboe
<axboe@kernel.dk>
Wed, 12 Sep 2018 14:50:16 +0000
(08:50 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 12 Sep 2018 14:50:16 +0000
(08:50 -0600)
If we pass in ERROR_SUCCESS, we should get a zero back.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/windows/posix.c
patch
|
blob
|
blame
|
history
diff --git
a/os/windows/posix.c
b/os/windows/posix.c
index 5b72beabe1e28b52e3c78623beb7d61dcae6a28c..fd1d5582f1b33c73b84c21f4fffec4c8aafd79b9 100644
(file)
--- 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) {
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:
case ERROR_FILE_NOT_FOUND:
return ENOENT;
case ERROR_PATH_NOT_FOUND: