return error;
}
+ error = et_to_sys_error(error);
+
if (error < 0)
error = CM_ERROR_TIMEDOUT;
else if (error == 30)
long cm_MapVLRPCError(long error, cm_req_t *reqp)
{
- if (error == 0) return 0;
-
- /* If we had to stop retrying, report our saved error code. */
- if (reqp && error == CM_ERROR_TIMEDOUT) {
- if (reqp->accessError)
- return reqp->accessError;
- if (reqp->volumeError)
- return reqp->volumeError;
- if (reqp->rpcError)
- return reqp->rpcError;
- return error;
- }
+ if (error == 0) return 0;
- if (error < 0)
- error = CM_ERROR_TIMEDOUT;
- else if (error == VL_NOENT)
- error = CM_ERROR_NOSUCHVOLUME;
+ /* If we had to stop retrying, report our saved error code. */
+ if (reqp && error == CM_ERROR_TIMEDOUT) {
+ if (reqp->accessError)
+ return reqp->accessError;
+ if (reqp->volumeError)
+ return reqp->volumeError;
+ if (reqp->rpcError)
+ return reqp->rpcError;
return error;
+ }
+
+ error = et_to_sys_error(error);
+
+ if (error < 0)
+ error = CM_ERROR_TIMEDOUT;
+ else if (error == VL_NOENT)
+ error = CM_ERROR_NOSUCHVOLUME;
+ return error;
}
cm_space_t *cm_GetSpace(void)