Changeset 10702 in vbox
- Timestamp:
- Jul 16, 2008 2:21:17 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/CFGM.cpp
r9328 r10702 597 597 * @param pNode Which node to search for pszName in. 598 598 * @param pszName Name of an integer value. 599 * @param pu64 Where to store the integer value. 599 * @param pu64 Where to store the integer value. This is set to the default on failure. 600 600 * @param u64Def The default value. 601 601 */ … … 611 611 rc = VERR_CFGM_NOT_INTEGER; 612 612 } 613 else if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 613 614 if (RT_FAILURE(rc)) 614 615 { 615 616 *pu64 = u64Def; 616 rc = VINF_SUCCESS; 617 } 617 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 618 rc = VINF_SUCCESS; 619 } 620 618 621 return rc; 619 622 } … … 658 661 * @param pNode Which node to search for pszName in. 659 662 * @param pszName Name of a zero terminate character value. 660 * @param pszString Where to store the string. 663 * @param pszString Where to store the string. This will not be set on overflow error. 661 664 * @param cchString Size of the string buffer. (Includes terminator.) 662 665 * @param pszDef The default value. … … 681 684 rc = VERR_CFGM_NOT_STRING; 682 685 } 683 else if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 686 687 if (RT_FAILURE(rc) && rc != VERR_CFGM_NOT_ENOUGH_SPACE) 684 688 { 685 689 size_t cchDef = strlen(pszDef); … … 688 692 memcpy(pszString, pszDef, cchDef); 689 693 memset(pszString + cchDef, 0, cchString - cchDef); 690 rc = VINF_SUCCESS; 694 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 695 rc = VINF_SUCCESS; 691 696 } 692 else 697 else if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 693 698 rc = VERR_CFGM_NOT_ENOUGH_SPACE; 694 699 } 700 695 701 return rc; 696 702 } … … 1703 1709 * @param pNode Which node to search for pszName in. 1704 1710 * @param pszName Name of an integer value. 1705 * @param pu64 Where to store the integer value. 1711 * @param pu64 Where to store the integer value. Set to default on failure. 1706 1712 * @param u64Def The default value. 1707 1713 */ … … 1736 1742 * @param pNode Which node to search for pszName in. 1737 1743 * @param pszName Name of an integer value. 1738 * @param pi64 Where to store the value. 1744 * @param pi64 Where to store the value. Set to default on failure. 1739 1745 * @param i64Def The default value. 1740 1746 */ … … 1778 1784 * @param pNode Which node to search for pszName in. 1779 1785 * @param pszName Name of an integer value. 1780 * @param pu32 Where to store the value. 1786 * @param pu32 Where to store the value. Set to default on failure. 1781 1787 * @param u32Def The default value. 1782 1788 */ … … 1826 1832 * @param pNode Which node to search for pszName in. 1827 1833 * @param pszName Name of an integer value. 1828 * @param pi32 Where to store the value. 1834 * @param pi32 Where to store the value. Set to default on failure. 1829 1835 * @param i32Def The default value. 1830 1836 */ … … 1874 1880 * @param pNode Which node to search for pszName in. 1875 1881 * @param pszName Name of an integer value. 1876 * @param pu16 Where to store the value. 1882 * @param pu16 Where to store the value. Set to default on failure. 1877 1883 * @param i16Def The default value. 1878 1884 */ … … 1922 1928 * @param pNode Which node to search for pszName in. 1923 1929 * @param pszName Name of an integer value. 1924 * @param pi16 Where to store the value. 1930 * @param pi16 Where to store the value. Set to default on failure. 1925 1931 * @param i16Def The default value. 1926 1932 */ … … 1970 1976 * @param pNode Which node to search for pszName in. 1971 1977 * @param pszName Name of an integer value. 1972 * @param pu8 Where to store the value. 1978 * @param pu8 Where to store the value. Set to default on failure. 1973 1979 * @param u8Def The default value. 1974 1980 */ … … 2018 2024 * @param pNode Which node to search for pszName in. 2019 2025 * @param pszName Name of an integer value. 2020 * @param pi8 Where to store the value. 2026 * @param pi8 Where to store the value. Set to default on failure. 2021 2027 * @param i8Def The default value. 2022 2028 */ … … 2062 2068 * @param pNode Which node to search for pszName in. 2063 2069 * @param pszName Name of an integer value. 2064 * @param pf Where to store the value. 2070 * @param pf Where to store the value. Set to default on failure. 2065 2071 * @param fDef The default value. 2066 2072 * @remark This function will interpret any non-zero value as true. … … 2097 2103 * @param pNode Which node to search for pszName in. 2098 2104 * @param pszName Name of an integer value. 2099 * @param pPort Where to store the value. 2105 * @param pPort Where to store the value. Set to default on failure. 2100 2106 * @param PortDef The default value. 2101 2107 */ … … 2128 2134 * @param pNode Which node to search for pszName in. 2129 2135 * @param pszName Name of an integer value. 2130 * @param pu Where to store the value. 2136 * @param pu Where to store the value. Set to default on failure. 2131 2137 * @param uDef The default value. 2132 2138 */ … … 2159 2165 * @param pNode Which node to search for pszName in. 2160 2166 * @param pszName Name of an integer value. 2161 * @param pi Where to store the value. 2167 * @param pi Where to store the value. Set to default on failure. 2162 2168 * @param iDef The default value. 2163 2169 */ … … 2199 2205 * @param pNode Which node to search for pszName in. 2200 2206 * @param pszName Name of an integer value. 2201 * @param ppv Where to store the value. 2207 * @param ppv Where to store the value. Set to default on failure. 2202 2208 * @param pvDef The default value. 2203 2209 */ … … 2248 2254 * @param pNode Which node to search for pszName in. 2249 2255 * @param pszName Name of an integer value. 2250 * @param pGCPtr Where to store the value. 2256 * @param pGCPtr Where to store the value. Set to default on failure. 2251 2257 * @param GCPtrDef The default value. 2252 2258 */ … … 2297 2303 * @param pNode Which node to search for pszName in. 2298 2304 * @param pszName Name of an integer value. 2299 * @param pGCPtr Where to store the value. 2305 * @param pGCPtr Where to store the value. Set to default on failure. 2300 2306 * @param GCPtrDef The default value. 2301 2307 */ … … 2346 2352 * @param pNode Which node to search for pszName in. 2347 2353 * @param pszName Name of an integer value. 2348 * @param pGCPtr Where to store the value. 2354 * @param pGCPtr Where to store the value. Set to default on failure. 2349 2355 * @param GCPtrDef The default value. 2350 2356 */ … … 2404 2410 * @param pNode Which node to search for pszName in. 2405 2411 * @param pszName Value name. This value must be of zero terminated character string type. 2406 * @param ppszString Where to store the string pointer. 2412 * @param ppszString Where to store the string pointer. Not set on failure. 2407 2413 * Free this using MMR3HeapFree(). 2408 2414 */
Note:
See TracChangeset
for help on using the changeset viewer.