DEVEL15-windows-pioctl-add-error-translations-20070614

add error translations for CM_ERROR_ALLDOWN, CM_ERROR_ALLBUSY,
CM_ERROR_ALLOFFLINE, CM_ERROR_NOSUCHPATH


(cherry picked from commit c27c00f8a9)
This commit is contained in:
Jeffrey Altman 2007-06-14 19:31:35 +00:00
parent dbd5762ef4
commit 2bc3dfc829

View File

@ -90,6 +90,7 @@ CMtoUNIXerror(int cm_code)
case CM_ERROR_NOACCESS:
return EACCES;
case CM_ERROR_NOSUCHFILE:
case CM_ERROR_NOSUCHPATH:
return ENOENT;
case CM_ERROR_INVAL:
return EINVAL;
@ -115,6 +116,12 @@ CMtoUNIXerror(int cm_code)
return EDOM; /* hack */
case CM_ERROR_TOOMANYBUFS:
return EFBIG; /* hack */
case CM_ERROR_ALLBUSY:
return EBUSY;
case CM_ERROR_ALLDOWN:
return ENOSYS; /* hack */
case CM_ERROR_ALLOFFLINE:
return ENXIO; /* hack */
default:
if (cm_code > 0 && cm_code < EILSEQ)
return cm_code;