VirtualBox

Ignore:
Timestamp:
Jul 17, 2007 6:33:02 AM (17 years ago)
Author:
vboxsync
Message:

replace underscore symbols in Devices/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvHostBase.cpp

    r3538 r3666  
    2626*******************************************************************************/
    2727#define LOG_GROUP LOG_GROUP_DRV_HOST_BASE
    28 #ifdef __DARWIN__
     28#ifdef RT_OS_DARWIN
    2929# include <mach/mach.h>
    3030# include <Carbon/Carbon.h>
     
    4141  /* Nothing special requires... yeah, right. */
    4242
    43 #elif defined(__LINUX__)
     43#elif defined(RT_OS_LINUX)
    4444# include <sys/ioctl.h>
    4545# include <sys/fcntl.h>
    4646# include <errno.h>
    4747
    48 #elif defined(__WIN__)
     48#elif defined(RT_OS_WINDOWS)
    4949# define WIN32_NO_STATUS
    5050# include <Windows.h>
     
    134134     */
    135135    int rc;
    136 #ifdef __DARWIN__
     136#ifdef RT_OS_DARWIN
    137137    if (    pThis->fMediaPresent
    138138        &&  pThis->ppScsiTaskDI
     
    142142#endif
    143143    {
    144 #ifdef __DARWIN__
     144#ifdef RT_OS_DARWIN
    145145        /*
    146146         * Issue a READ(12) request.
     
    211211        if (pThis->fMediaPresent)
    212212        {
    213 #ifdef __DARWIN__
     213#ifdef RT_OS_DARWIN
    214214            /** @todo write support... */
    215215            rc = VERR_WRITE_PROTECT;
     
    256256    if (pThis->fMediaPresent)
    257257    {
    258 #ifdef __DARWIN__
     258#ifdef RT_OS_DARWIN
    259259        rc = VINF_SUCCESS;
    260260        /** @todo scsi device buffer flush... */
     
    561561/* -=-=-=-=- poller thread -=-=-=-=- */
    562562
    563 #ifdef __DARWIN__
     563#ifdef RT_OS_DARWIN
    564564/** The runloop input source name for the disk arbitration events. */
    565565#define MY_RUN_LOOP_MODE    CFSTR("drvHostBaseDA")
     
    734734    }
    735735}
    736 #endif /* __DARWIN__ */
     736#endif /* RT_OS_DARWIN */
    737737
    738738
     
    745745static int drvHostBaseOpen(PDRVHOSTBASE pThis, PRTFILE pFileDevice, bool fReadOnly)
    746746{
    747 #ifdef __DARWIN__
     747#ifdef RT_OS_DARWIN
    748748    /* Darwin is kind of special... */
    749749    Assert(!pFileDevice); NOREF(pFileDevice);
     
    923923    return rc;
    924924
    925 #elif defined(__LINUX__)
     925#elif defined(RT_OS_LINUX)
    926926    /** @todo we've got RTFILE_O_NON_BLOCK now. Change the code to use RTFileOpen. */
    927927    int FileDevice = open(pThis->pszDeviceOpen, (pThis->fReadOnlyConfig ? O_RDONLY : O_RDWR) | O_NONBLOCK);
     
    950950static int drvHostBaseReopen(PDRVHOSTBASE pThis)
    951951{
    952 #ifndef __DARWIN__ /* Only *one* open for darwin. */
     952#ifndef RT_OS_DARWIN /* Only *one* open for darwin. */
    953953    LogFlow(("%s-%d: drvHostBaseReopen: '%s'\n", pThis->pDrvIns->pDrvReg->szDriverName, pThis->pDrvIns->iInstance, pThis->pszDeviceOpen));
    954954
     
    976976        RTFileClose(pThis->FileDevice);
    977977    pThis->FileDevice = FileDevice;
    978 #endif /* !__DARWIN__ */
     978#endif /* !RT_OS_DARWIN */
    979979    return VINF_SUCCESS;
    980980}
     
    990990static int drvHostBaseGetMediaSize(PDRVHOSTBASE pThis, uint64_t *pcb)
    991991{
    992 #ifdef __DARWIN__
     992#ifdef RT_OS_DARWIN
    993993    /*
    994994     * Try a READ_CAPACITY command...
     
    10191019    return rc;
    10201020
    1021 #elif defined(__WIN__)
     1021#elif defined(RT_OS_WINDOWS)
    10221022    /* use NT api, retry a few times if the media is being verified. */
    10231023    IO_STATUS_BLOCK             IoStatusBlock = {0};
     
    10541054
    10551055
    1056 #ifdef __DARWIN__
     1056#ifdef RT_OS_DARWIN
    10571057/**
    10581058 * Execute a SCSI command.
     
    10901090        *pcbBuf = 0;
    10911091
    1092 # ifdef __DARWIN__
     1092# ifdef RT_OS_DARWIN
    10931093    Assert(pThis->ppScsiTaskDI);
    10941094
     
    12271227
    12281228
    1229 #ifdef __WIN__
     1229#ifdef RT_OS_WINDOWS
    12301230
    12311231/**
     
    12841284}
    12851285
    1286 #endif /* __WIN__ */
     1286#endif /* RT_OS_WINDOWS */
    12871287
    12881288
     
    12991299    LogFlow(("%s-%d: drvHostBaseMediaThread: ThreadSelf=%p pvUser=%p\n",
    13001300             pThis->pDrvIns->pDrvReg->szDriverName, pThis->pDrvIns->iInstance, ThreadSelf, pvUser));
    1301 #ifdef __WIN__
     1301#ifdef RT_OS_WINDOWS
    13021302    static WNDCLASS s_classDeviceChange = {0};
    13031303    static ATOM     s_hAtomDeviceChange = 0;
     
    13521352    Assert(!pThis->hwndDeviceChange);
    13531353
    1354 #else /* !__WIN__ */
     1354#else /* !RT_OS_WINDOWS */
    13551355    bool        fFirst = true;
    13561356    int         cRetries = 10;
     
    13961396    }
    13971397
    1398 #endif /* !__WIN__ */
     1398#endif /* !RT_OS_WINDOWS */
    13991399
    14001400    /* (Don't clear the thread handle here, the destructor thread is using it to wait.) */
     
    14501450        do
    14511451        {
    1452 #ifdef __WIN__
     1452#ifdef RT_OS_WINDOWS
    14531453            if (pThis->hwndDeviceChange)
    14541454                PostMessage(pThis->hwndDeviceChange, WM_CLOSE, 0, 0); /* default win proc will destroy the window */
     
    14661466     * Unlock the drive if we've locked it or we're in passthru mode.
    14671467     */
    1468 #ifdef __DARWIN__
     1468#ifdef RT_OS_DARWIN
    14691469    if (    (   pThis->fLocked
    14701470             || pThis->IBlock.pfnSendCmd)
     
    14851485     * Cleanup the other resources.
    14861486     */
    1487 #ifdef __WIN__
     1487#ifdef RT_OS_WINDOWS
    14881488    if (pThis->hwndDeviceChange)
    14891489    {
     
    15001500#endif
    15011501
    1502 #ifdef __DARWIN__
     1502#ifdef RT_OS_DARWIN
    15031503    /*
    15041504     * The unclaiming doesn't seem to mean much, the DVD is actaully
     
    15981598    pThis->fKeepInstance                    = false;
    15991599    pThis->ThreadPoller                     = NIL_RTTHREAD;
    1600 #ifdef __DARWIN__
     1600#ifdef RT_OS_DARWIN
    16011601    pThis->MasterPort                       = NULL;
    16021602    pThis->ppMMCDI                          = NULL;
     
    17361736
    17371737    /* name to open & watch for */
    1738 #ifdef __WIN__
     1738#ifdef RT_OS_WINDOWS
    17391739    int iBit = toupper(pThis->pszDevice[0]) - 'A';
    17401740    if (    iBit > 'Z' - 'A'
     
    17981798     * Verify type.
    17991799     */
    1800 #ifdef __WIN__
     1800#ifdef RT_OS_WINDOWS
    18011801    UINT uDriveType = GetDriveType(pThis->pszDevice);
    18021802    switch (pThis->enmType)
     
    18331833     * Open the device.
    18341834     */
    1835 #ifdef __DARWIN__
     1835#ifdef RT_OS_DARWIN
    18361836    rc = drvHostBaseOpen(pThis, NULL, pThis->fReadOnlyConfig);
    18371837#else
     
    18411841    {
    18421842        char *pszDevice = pThis->pszDevice;
    1843 #ifndef __DARWIN__
     1843#ifndef RT_OS_DARWIN
    18441844        char szPathReal[256];
    18451845        if (   RTPathExists(pszDevice)
     
    18591859            case VERR_ACCESS_DENIED:
    18601860                return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
    1861 #ifdef __LINUX__
     1861#ifdef RT_OS_LINUX
    18621862                        N_("Cannot open host device '%s' for %s access. Check the permissions "
    18631863                           "of that device ('/bin/ls -l %s'): Most probably you need to be member "
     
    18821882        }
    18831883    }
    1884 #ifdef __WIN__
     1884#ifdef RT_OS_WINDOWS
    18851885    if (VBOX_SUCCESS(src))
    18861886        DRVHostBaseMediaPresent(pThis);
     
    19011901    }
    19021902
    1903 #ifndef __WIN__
     1903#ifndef RT_OS_WINDOWS
    19041904    if (VBOX_SUCCESS(src))
    19051905    {
     
    19381938        rc = RTThreadUserWait(pThis->ThreadPoller, 10000);
    19391939        AssertRC(rc);
    1940 #ifdef __WIN__
     1940#ifdef RT_OS_WINDOWS
    19411941        if (!pThis->hwndDeviceChange)
    19421942            return VERR_GENERAL_FAILURE;
Note: See TracChangeset for help on using the changeset viewer.

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