VirtualBox

Changeset 64497 in vbox


Ignore:
Timestamp:
Nov 1, 2016 4:38:06 AM (8 years ago)
Author:
vboxsync
Message:

PDMDriver.cpp Corrected driver transformation value name 'Driver' to 'Device' since it's actually matching the device name and not the driver (that's matched by 'AboveDriver'). Also added some docs to the basic keys and value involved in driver chain transformations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp

    r63560 r64497  
    425425        AssertLogRelRCReturn(rc, rc);
    426426
    427         /* Match against the driver multi pattern. */
     427        /** @cfgm{/PDM/DriverTransformations/<name>/Device,string,*}
     428         * One or more simple wildcard patters separated by '|' for matching
     429         * the devices this transformation rule applies to. */
    428430        char *pszMultiPat;
    429         rc = CFGMR3QueryStringAllocDef(pCurTrans, "Driver", &pszMultiPat, "*");
     431        rc = CFGMR3QueryStringAllocDef(pCurTrans, "Device", &pszMultiPat, "*");
    430432        AssertLogRelRCReturn(rc, rc);
    431433        bool fMatch = RTStrSimplePatternMultiMatch(pszMultiPat, RTSTR_MAX, pszDevice, RTSTR_MAX, NULL);
     
    434436            continue;
    435437
    436         /* Match against the lun multi pattern. */
     438        /** @cfgm{/PDM/DriverTransformations/<name>/LUN,string,*}
     439         * One or more simple wildcard patters separated by '|' for matching
     440         * the LUNs this transformation rule applies to. */
    437441        rc = CFGMR3QueryStringAllocDef(pCurTrans, "LUN", &pszMultiPat, "*");
    438442        AssertLogRelRCReturn(rc, rc);
     
    442446            continue;
    443447
    444         /* Match against the below-driver multi pattern. */
     448        /** @cfgm{/PDM/DriverTransformations/<name>/BelowDriver,string,*}
     449         * One or more simple wildcard patters separated by '|' for matching the
     450         * drivers the transformation should be applied below.  This means, that
     451         * when the drivers matched here attached another driver below them, the
     452         * transformation will be applied.  To represent the device, '<top>' is
     453         * used. */
    445454        rc = CFGMR3QueryStringAllocDef(pCurTrans, "BelowDriver", &pszMultiPat, "*");
    446455        AssertLogRelRCReturn(rc, rc);
     
    450459            continue;
    451460
    452         /* Match against the above-driver multi pattern. */
     461        /** @cfgm{/PDM/DriverTransformations/<name>/AboveDriver,string,*}
     462         * One or more simple wildcard patters separated by '|' for matching the
     463         * drivers the transformation should be applie above or at (depending on
     464         * the action).  The value being matched against here is the driver that
     465         * is in the process of being attached, so for mergeconfig actions this is
     466         * usually what you need to match on. */
    453467        rc = CFGMR3QueryStringAlloc(pCurTrans, "AboveDriver", &pszMultiPat);
    454468        if (rc == VERR_CFGM_VALUE_NOT_FOUND)
     
    467481        /*
    468482         * We've got a match! Now, what are we supposed to do?
     483         */
     484        /** @cfgm{/PDM/DriverTransformations/<name>/Action,string,inject}
     485         * The action that the the transformation takes.  Possible values are:
     486         *      - inject
     487         *      - mergeconfig: This merges and the content of the 'Config' key under the
     488         *        transformation into the driver's own 'Config' key, replacing any
     489         *        duplicates.
     490         *      - remove
     491         *      - removetree
     492         *      - replace
     493         *      - replacetree
    469494         */
    470495        char szAction[16];
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