Changeset 63591 in vbox for trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
- Timestamp:
- Aug 19, 2016 7:54:19 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r63583 r63591 1320 1320 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) 1321 1321 /* Linux & darwin needs a separate thread which monitors the status lines. */ 1322 # ifndef RT_OS_LINUX 1323 ioctl(RTFileToNative(pThis->hDeviceFile), TIOCMGET, &pThis->fStatusLines); 1324 # endif 1325 rc = PDMDrvHlpThreadCreate(pDrvIns, &pThis->pMonitorThread, pThis, drvHostSerialMonitorThread, drvHostSerialWakeupMonitorThread, 0, RTTHREADTYPE_IO, "SerMon"); 1326 if (RT_FAILURE(rc)) 1327 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("HostSerial#%d cannot create monitor thread"), pDrvIns->iInstance); 1322 int rcPsx = ioctl(RTFileToNative(pThis->hDeviceFile), TIOCMGET, &pThis->fStatusLines); 1323 if (!rcPsx) 1324 { 1325 rc = PDMDrvHlpThreadCreate(pDrvIns, &pThis->pMonitorThread, pThis, drvHostSerialMonitorThread, drvHostSerialWakeupMonitorThread, 0, RTTHREADTYPE_IO, "SerMon"); 1326 if (RT_FAILURE(rc)) 1327 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("HostSerial#%d cannot create monitor thread"), pDrvIns->iInstance); 1328 } 1329 else 1330 { 1331 /* TIOCMGET is not supported for pseudo terminals so just silently skip it. */ 1332 if (errno != ENOTTY) 1333 PDMDrvHlpVMSetRuntimeError(pDrvIns, 0 /*fFlags*/, "DrvHostSerialFail", 1334 N_("Trying to get the status lines state failed for serial host device '%s' (%Rrc). The device will not work properly"), 1335 pThis->pszDevicePath, RTErrConvertFromErrno(errno)); 1336 } 1328 1337 #endif 1329 1338
Note:
See TracChangeset
for help on using the changeset viewer.