client/src/unifycr.c
int unifycr_err_map_to_errno(int rc)
{
    switch(rc) {
    case UNIFYCR_SUCCESS:     return 0;
    case UNIFYCR_FAILURE:     return EIO;
    case UNIFYCR_ERR_NOSPC:   return ENOSPC;
    case UNIFYCR_ERR_IO:      return EIO;
    case UNIFYCR_ERR_NAMETOOLONG: return ENAMETOOLONG;
    case UNIFYCR_ERR_NOENT:   return ENOENT;
    case UNIFYCR_ERR_EXIST:   return EEXIST;
    case UNIFYCR_ERR_NOTDIR:  return ENOTDIR;
    case UNIFYCR_ERR_NFILE:   return ENFILE;
    case UNIFYCR_ERR_INVAL:   return EINVAL;
    case UNIFYCR_ERR_OVERFLOW: return EOVERFLOW;
    case UNIFYCR_ERR_FBIG:    return EFBIG;
    case UNIFYCR_ERR_BADF:    return EBADF;
    case UNIFYCR_ERR_ISDIR:   return EISDIR;
    default:                 return EIO;
    }
}
/* given an UNIFYCR error code, return corresponding errno code */
given an UNIFYCR error code, return corresponding errno code
given an UNIFYCR error code return corresponding errno code
int unifycr_err_map_to_errno(int rc)
{
    switch(rc) {
    case UNIFYCR_SUCCESS:     return 0;
    case UNIFYCR_FAILURE:     return EIO;
    case UNIFYCR_ERR_NOSPC:   return ENOSPC;
    case UNIFYCR_ERR_IO:      return EIO;
    case UNIFYCR_ERR_NAMETOOLONG: return ENAMETOOLONG;
    case UNIFYCR_ERR_NOENT:   return ENOENT;
    case UNIFYCR_ERR_EXIST:   return EEXIST;
    case UNIFYCR_ERR_NOTDIR:  return ENOTDIR;
    case UNIFYCR_ERR_NFILE:   return ENFILE;
    case UNIFYCR_ERR_INVAL:   return EINVAL;
    case UNIFYCR_ERR_OVERFLOW: return EOVERFLOW;
    case UNIFYCR_ERR_FBIG:    return EFBIG;
    case UNIFYCR_ERR_BADF:    return EBADF;
    case UNIFYCR_ERR_ISDIR:   return EISDIR;
    default:                 return EIO;
    }
}
int unifycr_err_map_to_errno ( int rc ) { switch ( rc ) { case UNIFYCR_SUCCESS : return 0 ; case UNIFYCR_FAILURE : return EIO ; case UNIFYCR_ERR_NOSPC : return ENOSPC ; case UNIFYCR_ERR_IO : return EIO ; case UNIFYCR_ERR_NAMETOOLONG : return ENAMETOOLONG ; case UNIFYCR_ERR_NOENT : return ENOENT ; case UNIFYCR_ERR_EXIST : return EEXIST ; case UNIFYCR_ERR_NOTDIR : return ENOTDIR ; case UNIFYCR_ERR_NFILE : return ENFILE ; case UNIFYCR_ERR_INVAL : return EINVAL ; case UNIFYCR_ERR_OVERFLOW : return EOVERFLOW ; case UNIFYCR_ERR_FBIG : return EFBIG ; case UNIFYCR_ERR_BADF : return EBADF ; case UNIFYCR_ERR_ISDIR : return EISDIR ; default : return EIO ; } }
given an UNIFYCR error code, return corresponding errno code
given an UNIFYCR error code return corresponding errno code