mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-04 05:40:14 -05:00
Adds more error conversion from Windows to errno.
Also prints the error if the conversion is no supported.
This commit is contained in:
parent
18cc04b0dc
commit
13d4dd7f03
2 changed files with 9 additions and 2 deletions
7
mingw.c
7
mingw.c
|
|
@ -208,7 +208,14 @@ static void windows_errno(DWORD error)
|
|||
case ERROR_ACCESS_DENIED :
|
||||
errno = EACCES;
|
||||
break;
|
||||
case ERROR_BUFFER_OVERFLOW :
|
||||
errno = ENAMETOOLONG;
|
||||
break;
|
||||
case ERROR_NOT_ENOUGH_MEMORY :
|
||||
errno = ENOMEM;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unexpected Windows error %d.\n", error);
|
||||
errno = EIO;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue