VirtualBox

Changeset 15836 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 7, 2009 3:45:20 PM (16 years ago)
Author:
vboxsync
Message:

Devices/Serial: Enabled Host serial support for Solaris.

Location:
trunk/src/VBox/Devices
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Builtins.cpp

    r15366 r15836  
    244244#endif
    245245
    246 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS)
     246#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)
    247247    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSerial);
    248248    if (RT_FAILURE(rc))
  • trunk/src/VBox/Devices/Makefile.kmk

    r15791 r15836  
    688688        $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \
    689689        Storage/DrvHostBase.cpp \
    690         Storage/DrvHostDVD.cpp
     690        Storage/DrvHostDVD.cpp \
     691        Serial/DrvHostSerial.cpp
    691692 ifdef VBOX_WITH_CROSSBOW
    692693  Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp
  • trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp

    r13837 r15836  
    3838#include <iprt/alloc.h>
    3939
    40 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     40#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    4141# include <errno.h>
    42 # include <termios.h>
     42# ifdef RT_OS_SOLARIS
     43#  include <sys/termios.h>
     44# else
     45#  include <termios.h>
     46# endif
    4347# include <sys/types.h>
    4448# include <fcntl.h>
     
    110114    char                        *pszDevicePath;
    111115
    112 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     116#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    113117    /** the device handle */
    114118    RTFILE                      DeviceFile;
     
    241245{
    242246    PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface);
    243 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     247#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    244248    struct termios *termiosSetup;
    245249    int baud_rate;
     
    250254    LogFlow(("%s: Bps=%u chParity=%c cDataBits=%u cStopBits=%u\n", __FUNCTION__, Bps, chParity, cDataBits, cStopBits));
    251255
    252 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     256#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    253257    termiosSetup = (struct termios *)RTMemTmpAllocZ(sizeof(struct termios));
    254258
     
    514518            uint64_t volatile u64Now = RTTimeNanoTS(); NOREF(u64Now);
    515519#endif
    516 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     520#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    517521
    518522            size_t cbWritten;
     
    595599            abBuf[0] = pThis->aSendQueue[iTail];
    596600
    597 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     601#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    598602
    599603            rc = RTFileWrite(pThis->DeviceFile, abBuf, cbProcessed, NULL);
     
    760764            cbRemaining = cbRead;
    761765
    762 #elif defined(RT_OS_LINUX)
     766#elif defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS)
    763767
    764768            size_t cbRead;
     
    916920{
    917921    PDRVHOSTSERIAL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL);
    918 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     922#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    919923    return RTFileWrite(pThis->WakeupPipeW, "", 1, NULL);
    920924#elif defined(RT_OS_WINDOWS)
     
    927931}
    928932
    929 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     933#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    930934/* -=-=-=-=- Monitor thread -=-=-=-=- */
    931935
     
    11181122    return VINF_SUCCESS;
    11191123}
    1120 #endif /* RT_OS_LINUX || RT_OS_DARWIN */
     1124#endif /* RT_OS_LINUX || RT_OS_DARWIN || RT_OS_SOLARIS */
    11211125
    11221126/**
     
    11321136    PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface);
    11331137
    1134 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     1138#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    11351139    int modemStateSet = 0;
    11361140    int modemStateClear = 0;
     
    11881192     * Init basic data members and interfaces.
    11891193     */
    1190 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     1194#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    11911195    pThis->DeviceFile  = NIL_RTFILE;
    11921196# ifdef RT_OS_DARWIN
     
    12691273            case VERR_ACCESS_DENIED:
    12701274                return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
    1271 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     1275#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    12721276                                           N_("Cannot open host device '%s' for read/write access. Check the permissions "
    12731277                                              "of that device ('/bin/ls -l %s'): Most probably you need to be member "
     
    12871291
    12881292    /* Set to non blocking I/O */
    1289 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     1293#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    12901294
    12911295    fcntl(pThis->DeviceFile, F_SETFL, O_NONBLOCK);
     
    13391343        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("HostSerial#%d cannot create send thread"), pDrvIns->iInstance);
    13401344
    1341 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     1345#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    13421346    /* Linux & darwin needs a separate thread which monitors the status lines. */
    13431347# ifndef RT_OS_LINUX
     
    13821386    pThis->SendSem = NIL_RTSEMEVENT;
    13831387
    1384 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN)
     1388#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS)
    13851389
    13861390    if (pThis->WakeupPipeW != NIL_RTFILE)
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