VirtualBox

Ignore:
Timestamp:
Dec 17, 2009 2:49:34 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56131
Message:

SUPDrv,++: Made SUPDrv.c platform agnostic and renamed SUPDrvAgnostic.c to SUPDrvSem.c. dprintf and dprintf2 are no more (Log/Log2), while OSDBGPRINT simply calls SUPR0Printf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r25278 r25465  
    788788
    789789/**
    790  * Converts a supdrv error code to a darwin error code.
     790 * Converts an IPRT error code to a darwin error code.
    791791 *
    792792 * @returns corresponding darwin error code.
    793  * @param   rc  supdrv error code (SUPDRV_ERR_* defines).
     793 * @param   rc      IPRT status code.
    794794 */
    795795static int VBoxDrvDarwinErr2DarwinErr(int rc)
     
    797797    switch (rc)
    798798    {
    799         case 0:                             return 0;
    800         case SUPDRV_ERR_GENERAL_FAILURE:    return EACCES;
    801         case SUPDRV_ERR_INVALID_PARAM:      return EINVAL;
    802         case SUPDRV_ERR_INVALID_MAGIC:      return EILSEQ;
    803         case SUPDRV_ERR_INVALID_HANDLE:     return ENXIO;
    804         case SUPDRV_ERR_INVALID_POINTER:    return EFAULT;
    805         case SUPDRV_ERR_LOCK_FAILED:        return ENOLCK;
    806         case SUPDRV_ERR_ALREADY_LOADED:     return EEXIST;
    807         case SUPDRV_ERR_PERMISSION_DENIED:  return EPERM;
    808         case SUPDRV_ERR_VERSION_MISMATCH:   return ENOSYS;
     799        case VINF_SUCCESS:              return 0;
     800        case VERR_GENERAL_FAILURE:      return EACCES;
     801        case VERR_INVALID_PARAMETER:    return EINVAL;
     802        case VERR_INVALID_MAGIC:        return EILSEQ;
     803        case VERR_INVALID_HANDLE:       return ENXIO;
     804        case VERR_INVALID_POINTER:      return EFAULT;
     805        case VERR_LOCK_FAILED:          return ENOLCK;
     806        case VERR_ALREADY_LOADED:       return EEXIST;
     807        case VERR_PERMISSION_DENIED:    return EPERM;
     808        case VERR_VERSION_MISMATCH:     return ENOSYS;
    809809    }
    810810
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette