Changeset 15836 in vbox for trunk/src/VBox
- Timestamp:
- Jan 7, 2009 3:45:20 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Builtins.cpp
r15366 r15836 244 244 #endif 245 245 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) 247 247 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSerial); 248 248 if (RT_FAILURE(rc)) -
trunk/src/VBox/Devices/Makefile.kmk
r15791 r15836 688 688 $(if $(VBOX_SOLARIS_10),,Network/DrvTAP.cpp) \ 689 689 Storage/DrvHostBase.cpp \ 690 Storage/DrvHostDVD.cpp 690 Storage/DrvHostDVD.cpp \ 691 Serial/DrvHostSerial.cpp 691 692 ifdef VBOX_WITH_CROSSBOW 692 693 Drivers_SOURCES += Network/solaris/vbox-libdlpi.cpp -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r13837 r15836 38 38 #include <iprt/alloc.h> 39 39 40 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 40 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 41 41 # 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 43 47 # include <sys/types.h> 44 48 # include <fcntl.h> … … 110 114 char *pszDevicePath; 111 115 112 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 116 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 113 117 /** the device handle */ 114 118 RTFILE DeviceFile; … … 241 245 { 242 246 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) 244 248 struct termios *termiosSetup; 245 249 int baud_rate; … … 250 254 LogFlow(("%s: Bps=%u chParity=%c cDataBits=%u cStopBits=%u\n", __FUNCTION__, Bps, chParity, cDataBits, cStopBits)); 251 255 252 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 256 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 253 257 termiosSetup = (struct termios *)RTMemTmpAllocZ(sizeof(struct termios)); 254 258 … … 514 518 uint64_t volatile u64Now = RTTimeNanoTS(); NOREF(u64Now); 515 519 #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) 517 521 518 522 size_t cbWritten; … … 595 599 abBuf[0] = pThis->aSendQueue[iTail]; 596 600 597 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 601 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 598 602 599 603 rc = RTFileWrite(pThis->DeviceFile, abBuf, cbProcessed, NULL); … … 760 764 cbRemaining = cbRead; 761 765 762 #elif defined(RT_OS_LINUX) 766 #elif defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) 763 767 764 768 size_t cbRead; … … 916 920 { 917 921 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) 919 923 return RTFileWrite(pThis->WakeupPipeW, "", 1, NULL); 920 924 #elif defined(RT_OS_WINDOWS) … … 927 931 } 928 932 929 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 933 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 930 934 /* -=-=-=-=- Monitor thread -=-=-=-=- */ 931 935 … … 1118 1122 return VINF_SUCCESS; 1119 1123 } 1120 #endif /* RT_OS_LINUX || RT_OS_DARWIN */1124 #endif /* RT_OS_LINUX || RT_OS_DARWIN || RT_OS_SOLARIS */ 1121 1125 1122 1126 /** … … 1132 1136 PDRVHOSTSERIAL pThis = PDMICHAR_2_DRVHOSTSERIAL(pInterface); 1133 1137 1134 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 1138 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1135 1139 int modemStateSet = 0; 1136 1140 int modemStateClear = 0; … … 1188 1192 * Init basic data members and interfaces. 1189 1193 */ 1190 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 1194 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1191 1195 pThis->DeviceFile = NIL_RTFILE; 1192 1196 # ifdef RT_OS_DARWIN … … 1269 1273 case VERR_ACCESS_DENIED: 1270 1274 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) 1272 1276 N_("Cannot open host device '%s' for read/write access. Check the permissions " 1273 1277 "of that device ('/bin/ls -l %s'): Most probably you need to be member " … … 1287 1291 1288 1292 /* 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) 1290 1294 1291 1295 fcntl(pThis->DeviceFile, F_SETFL, O_NONBLOCK); … … 1339 1343 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("HostSerial#%d cannot create send thread"), pDrvIns->iInstance); 1340 1344 1341 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 1345 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1342 1346 /* Linux & darwin needs a separate thread which monitors the status lines. */ 1343 1347 # ifndef RT_OS_LINUX … … 1382 1386 pThis->SendSem = NIL_RTSEMEVENT; 1383 1387 1384 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 1388 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) 1385 1389 1386 1390 if (pThis->WakeupPipeW != NIL_RTFILE)
Note:
See TracChangeset
for help on using the changeset viewer.