VirtualBox

Changeset 91863 in vbox


Ignore:
Timestamp:
Oct 20, 2021 9:04:02 AM (3 years ago)
Author:
vboxsync
Message:

Devices/Input: Change input drivers to access the CFGM API through the driver helper callback table only, bugref:10074

Location:
trunk/src/VBox/Devices/Input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp

    r90241 r91863  
    468468static DECLCALLBACK(int) drvKbdQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    469469{
    470     PDRVKBDQUEUE pDrv = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
     470    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     471    PDRVKBDQUEUE    pDrv = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE);
     472    PCPDMDRVHLPR3   pHlp = pDrvIns->pHlpR3;
     473
    471474    LogFlow(("drvKbdQueueConstruct: iInstance=%d\n", pDrvIns->iInstance));
    472     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     475
    473476
    474477    /*
    475478     * Validate configuration.
    476479     */
    477     if (!CFGMR3AreValuesValid(pCfg, "QueueSize\0Interval\0"))
    478         return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
     480    PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns, "QueueSize|Interval", "");
    479481
    480482    /*
     
    526528     */
    527529    uint32_t cMilliesInterval = 0;
    528     rc = CFGMR3QueryU32(pCfg, "Interval", &cMilliesInterval);
     530    rc = pHlp->pfnCFGMQueryU32(pCfg, "Interval", &cMilliesInterval);
    529531    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    530532        cMilliesInterval = 0;
     
    536538
    537539    uint32_t cItems = 0;
    538     rc = CFGMR3QueryU32(pCfg, "QueueSize", &cItems);
     540    rc = pHlp->pfnCFGMQueryU32(pCfg, "QueueSize", &cItems);
    539541    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    540542        cItems = 128;
  • trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp

    r89832 r91863  
    328328static DECLCALLBACK(int) drvMouseQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    329329{
    330     PDRVMOUSEQUEUE pDrv = PDMINS_2_DATA(pDrvIns, PDRVMOUSEQUEUE);
     330    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     331    PDRVMOUSEQUEUE  pDrv = PDMINS_2_DATA(pDrvIns, PDRVMOUSEQUEUE);
     332    PCPDMDRVHLPR3   pHlp = pDrvIns->pHlpR3;
     333
    331334    LogFlow(("drvMouseQueueConstruct: iInstance=%d\n", pDrvIns->iInstance));
    332     PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
    333335
    334336    /*
    335337     * Validate configuration.
    336338     */
    337     if (!CFGMR3AreValuesValid(pCfg, "QueueSize\0Interval\0"))
    338         return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
     339    PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns, "QueueSize|Interval", "");
    339340
    340341    /*
     
    383384     */
    384385    uint32_t cMilliesInterval = 0;
    385     rc = CFGMR3QueryU32(pCfg, "Interval", &cMilliesInterval);
     386    rc = pHlp->pfnCFGMQueryU32(pCfg, "Interval", &cMilliesInterval);
    386387    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    387388        cMilliesInterval = 0;
     
    393394
    394395    uint32_t cItems = 0;
    395     rc = CFGMR3QueryU32(pCfg, "QueueSize", &cItems);
     396    rc = pHlp->pfnCFGMQueryU32(pCfg, "QueueSize", &cItems);
    396397    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    397398        cItems = 128;
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