Changeset 62993 in vbox
- Timestamp:
- Aug 4, 2016 3:11:32 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r62686 r62993 330 330 /* Get handle of the first logical configuration. */ 331 331 LOG_CONF hFirstLogConf; 332 short wHeaderSize = sizeof(IO_DES);333 332 CONFIGRET rcCm = CM_Get_First_Log_Conf(&hFirstLogConf, DevInst, ALLOC_LOG_CONF); 334 333 if (rcCm != CR_SUCCESS) … … 530 529 static int drvHostParallelSetMode(PDRVHOSTPARALLEL pThis, PDMPARALLELPORTMODE enmMode) 531 530 { 531 LogFlowFunc(("mode=%d\n", enmMode)); 532 # ifndef VBOX_WITH_WIN_PARPORT_SUP 533 int rc = VINF_SUCCESS; 532 534 int iMode = 0; 533 int rc = VINF_SUCCESS;534 LogFlowFunc(("mode=%d\n", enmMode));535 536 # ifndef VBOX_WITH_WIN_PARPORT_SUP537 535 int rcLnx; 538 536 if (pThis->enmModeCur != enmMode) … … 564 562 return rc; 565 563 # else /* VBOX_WITH_WIN_PARPORT_SUP */ 564 RT_NOREF(pThis, enmMode); 566 565 return VINF_SUCCESS; 567 566 # endif /* VBOX_WITH_WIN_PARPORT_SUP */ … … 589 588 * @interface_method_impl{PDMIHOSTPARALLELCONNECTOR,pfnWrite} 590 589 */ 591 static DECLCALLBACK(int) drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterface, const void *pvBuf, size_t cbWrite, 592 PDMPARALLELPORTMODE enmMode) 593 { 594 PPDMDRVINS pDrvIns = PDMIBASE_2_PDMDRV(pInterface); 595 //PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); 596 PDRVHOSTPARALLEL pThis = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector)); 590 static DECLCALLBACK(int) 591 drvHostParallelWrite(PPDMIHOSTPARALLELCONNECTOR pInterface, const void *pvBuf, size_t cbWrite, PDMPARALLELPORTMODE enmMode) 592 { 593 PDRVHOSTPARALLEL pThis = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector)); 597 594 int rc = VINF_SUCCESS; 598 int rcLnx = 0;599 595 600 596 LogFlowFunc(("pvBuf=%#p cbWrite=%d\n", pvBuf, cbWrite)); … … 604 600 return rc; 605 601 # ifndef VBOX_WITH_WIN_PARPORT_SUP 602 int rcLnx = 0; 606 603 if (enmMode == PDM_PARALLEL_PORT_MODE_SPP) 607 604 { … … 638 635 * @interface_method_impl{PDMIHOSTPARALLELCONNECTOR,pfnRead} 639 636 */ 640 static DECLCALLBACK(int) drvHostParallelRead(PPDMIHOSTPARALLELCONNECTOR pInterface, void *pvBuf, size_t cbRead,641 642 { 643 PDRVHOSTPARALLEL pThis= RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector));637 static DECLCALLBACK(int) 638 drvHostParallelRead(PPDMIHOSTPARALLELCONNECTOR pInterface, void *pvBuf, size_t cbRead, PDMPARALLELPORTMODE enmMode) 639 { 640 PDRVHOSTPARALLEL pThis = RT_FROM_MEMBER(pInterface, DRVHOSTPARALLEL, CTX_SUFF(IHostParallelConnector)); 644 641 int rc = VINF_SUCCESS; 645 642 … … 666 663 667 664 # else /* VBOX_WITH_WIN_PARPORT_SUP */ 665 RT_NOREF(enmMode); 668 666 if (pThis->PortDirectData != 0) 669 667 { … … 870 868 static DECLCALLBACK(void) drvHostParallelDestruct(PPDMDRVINS pDrvIns) 871 869 { 870 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 871 LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance)); 872 873 #ifndef VBOX_WITH_WIN_PARPORT_SUP 872 874 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); 873 LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance));874 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);875 876 #ifndef VBOX_WITH_WIN_PARPORT_SUP877 875 if (pThis->hFileDevice != NIL_RTFILE) 878 876 ioctl(RTFileToNative(pThis->hFileDevice), PPRELEASE); … … 911 909 static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 912 910 { 911 RT_NOREF(fFlags); 912 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 913 LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance)); 913 914 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); 914 LogFlowFunc(("iInstance=%d\n", pDrvIns->iInstance)); 915 916 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 915 917 916 918 917 /*
Note:
See TracChangeset
for help on using the changeset viewer.