VirtualBox

Ignore:
Timestamp:
May 19, 2012 11:26:39 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
78043
Message:

SUPDrv-dtrace.cpp: sigh.

File:
1 edited

Legend:

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

    r41354 r41357  
    6868# define intptr_t dtrace_intptr_t
    6969# include "dtrace.h"
     70# define FIX_UEK_RC(a_rc) (-(a_rc))
    7071#else
    7172# include <sys/dtrace.h>
     73#endif
     74
     75
     76/**
     77 * The UEK DTrace port is trying to be smart and seems to have turned all
     78 * errno return codes negative.  While this conforms to the linux kernel way of
     79 * doing things, it breaks with the way the interfaces work on Solaris and
     80 * Mac OS X.
     81 */
     82#ifndef FIX_UEK_RC
     83# define FIX_UEK_RC(a_rc) (a_rc)
    7284#endif
    7385
     
    925937    {
    926938        pCore->TracerData.DTrace.idProvider = 0;
    927         rc = RTErrConvertFromErrno(rc);
     939        rc = RTErrConvertFromErrno(FIX_UEK_RC(rc));
    928940    }
    929941
     
    951963    else
    952964    {
    953         AssertMsg(rc == EBUSY, ("%d\n", rc));
     965        AssertMsg(FIX_UEK_RC(rc) == EBUSY, ("%d\n", rc));
    954966        pCore->TracerData.DTrace.fZombie = true;
    955967        rc = VERR_TRY_AGAIN;
     
    979991    else
    980992    {
    981         AssertMsg(rc == EBUSY, ("%d\n", rc));
     993        AssertMsg(FIX_UEK_RC(rc) == EBUSY, ("%d\n", rc));
    982994        rc = VERR_TRY_AGAIN;
    983995    }
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