Changeset 33728 in vbox
- Timestamp:
- Nov 3, 2010 2:05:37 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r33595 r33728 1360 1360 } 1361 1361 1362 #else 1363 1364 rc = RTFileOpen(&pThis->DeviceFile, pThis->pszDevicePath, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE); 1362 #else /* !RT_OS_WINDOWS */ 1363 1364 uint32_t fOpen = RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE; 1365 # ifdef RT_OS_LINUX 1366 /* This seems to be necessary on some Linux hosts, otherwise we hang here forever. 1367 * Surprisingly, I've never seen VERR_TRY_AGAIN as result even if RTFileOpen() 1368 * would block without that flag. */ 1369 fOpen |= RTFILE_O_NON_BLOCK; 1370 # endif 1371 rc = RTFileOpen(&pThis->DeviceFile, pThis->pszDevicePath, fOpen); 1372 # ifdef RT_OS_LINUX 1373 if (rc == VERR_INVALID_PARAMETER) 1374 rc = RTFileOpen(&pThis->DeviceFile, pThis->pszDevicePath, fOpen & ~RTFILE_O_NON_BLOCK); 1375 # endif 1365 1376 # ifdef RT_OS_DARWIN 1366 1377 if (RT_SUCCESS(rc)) … … 1369 1380 1370 1381 1371 #endif 1382 #endif /* !RT_OS_WINDOWS */ 1372 1383 1373 1384 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.