VirtualBox

Changeset 9324 in vbox


Ignore:
Timestamp:
Jun 2, 2008 8:38:00 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
31538
Message:

Added CFGMR3QueryUInt, CFGMR3QueryUIntDef, CFGMR3QuerySInt and CFGMR3QuerySIntDef.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/cfgm.h

    r9322 r9324  
    142142CFGMR3DECL(int)         CFGMR3QueryPort(        PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort);
    143143CFGMR3DECL(int)         CFGMR3QueryPortDef(     PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort, RTIOPORT PortDef);
     144CFGMR3DECL(int)         CFGMR3QueryUInt(        PCFGMNODE pNode, const char *pszName, unsigned int *pu);
     145CFGMR3DECL(int)         CFGMR3QueryUIntDef(     PCFGMNODE pNode, const char *pszName, unsigned int *pu, unsigned int uDef);
     146CFGMR3DECL(int)         CFGMR3QuerySInt(        PCFGMNODE pNode, const char *pszName, signed int *pi);
     147CFGMR3DECL(int)         CFGMR3QuerySIntDef(     PCFGMNODE pNode, const char *pszName, signed int *pi, signed int iDef);
    144148CFGMR3DECL(int)         CFGMR3QueryPtr(         PCFGMNODE pNode, const char *pszName, void **ppv);
    145149CFGMR3DECL(int)         CFGMR3QueryPtrDef(      PCFGMNODE pNode, const char *pszName, void **ppv, void *pvDef);
  • trunk/src/VBox/VMM/CFGM.cpp

    r9323 r9324  
    21082108
    21092109/**
     2110 * Query unsigned int address value.
     2111 *
     2112 * @returns VBox status code.
     2113 * @param   pNode           Which node to search for pszName in.
     2114 * @param   pszName         Name of an integer value.
     2115 * @param   pu              Where to store the value.
     2116 */
     2117CFGMR3DECL(int) CFGMR3QueryUInt(PCFGMNODE pNode, const char *pszName, unsigned int *pu)
     2118{
     2119    AssertCompileSize(unsigned int, 4);
     2120    return CFGMR3QueryU32(pNode, pszName, (uint32_t *)pu);
     2121}
     2122
     2123
     2124/**
     2125 * Query unsigned int address value with default.
     2126 *
     2127 * @returns VBox status code.
     2128 * @param   pNode           Which node to search for pszName in.
     2129 * @param   pszName         Name of an integer value.
     2130 * @param   pu              Where to store the value.
     2131 * @param   uDef            The default value.
     2132 */
     2133CFGMR3DECL(int) CFGMR3QueryUInt(PCFGMNODE pNode, const char *pszName, unsigned int *pu, unsigned int uDef)
     2134{
     2135    AssertCompileSize(unsigned int, 4);
     2136    return CFGMR3QueryU32Def(pNode, pszName, (uint32_t *)pu, uDef);
     2137}
     2138
     2139
     2140/**
     2141 * Query signed int address value.
     2142 *
     2143 * @returns VBox status code.
     2144 * @param   pNode           Which node to search for pszName in.
     2145 * @param   pszName         Name of an integer value.
     2146 * @param   pi              Where to store the value.
     2147 */
     2148CFGMR3DECL(int) CFGMR3QuerySInt(PCFGMNODE pNode, const char *pszName, signed int *pi)
     2149{
     2150    AssertCompileSize(signed int, 4);
     2151    return CFGMR3QueryS32(pNode, pszName, (int32_t *)pi);
     2152}
     2153
     2154
     2155/**
     2156 * Query unsigned int address value with default.
     2157 *
     2158 * @returns VBox status code.
     2159 * @param   pNode           Which node to search for pszName in.
     2160 * @param   pszName         Name of an integer value.
     2161 * @param   pi              Where to store the value.
     2162 * @param   iDef            The default value.
     2163 */
     2164CFGMR3DECL(int) CFGMR3QueryUInt(PCFGMNODE pNode, const char *pszName, signed int *pi, signed int iDef)
     2165{
     2166    AssertCompileSize(signed int, 4);
     2167    return CFGMR3QueryS32Def(pNode, pszName, (int32_t *)pi, iDef);
     2168}
     2169
     2170
     2171/**
    21102172 * Query pointer integer value.
    21112173 *
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette