don't remap errors > ELAST to EIO (should display via number w/o name)

This commit is contained in:
Kelvin Sherlock 2017-07-27 11:15:07 -04:00
parent 92070e2e65
commit f635d32e00

View File

@ -10,7 +10,11 @@ int remap_os_error(unsigned long e) {
switch(e) {
case NO_ERROR: return 0;
default: return EIO;
default:
#ifdef ELAST
if (e > ELAST) return e;
#endif
return EIO;
case ERROR_INVALID_HANDLE:
return EBADF;
@ -24,7 +28,6 @@ int remap_os_error(unsigned long e) {
case ERROR_WRITE_FAULT:
return EIO;
case ERROR_ACCESS_DENIED:
case ERROR_CANNOT_MAKE:
case ERROR_CURRENT_DIRECTORY: