VirtualBox

Changeset 46792 in vbox


Ignore:
Timestamp:
Jun 26, 2013 9:27:42 AM (11 years ago)
Author:
vboxsync
Message:

Added CFGMR3DestroyTree.

Location:
trunk
Files:
3 edited

Legend:

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

    r44387 r46792  
    8888
    8989VMMR3DECL(PCFGMNODE)    CFGMR3CreateTree(PUVM pUVM);
     90VMMR3DECL(int)          CFGMR3DestroyTree(PCFGMNODE pRoot);
    9091VMMR3DECL(void)         CFGMR3Dump(PCFGMNODE pRoot);
    9192VMMR3DECL(int)          CFGMR3DuplicateSubTree(PCFGMNODE pRoot, PCFGMNODE *ppCopy);
  • trunk/src/VBox/VMM/VMMR3/CFGM.cpp

    r46791 r46792  
    19111911
    19121912/**
    1913  * Remove a node.
    1914  *
    1915  * @param   pNode       Parent node.
     1913 * Removes a node.
     1914 *
     1915 * @param   pNode       The node to remove.
    19161916 */
    19171917VMMR3DECL(void) CFGMR3RemoveNode(PCFGMNODE pNode)
     
    20182018        pLeaf->enmType = (CFGMVALUETYPE)0;
    20192019    }
     2020}
     2021
     2022/**
     2023 * Destroys a tree created with CFGMR3CreateTree or CFGMR3DuplicateSubTree.
     2024 *
     2025 * @returns VBox status code.
     2026 * @param   pRoot       The root node of the tree.
     2027 */
     2028VMMR3DECL(int) CFGMR3DestroyTree(PCFGMNODE pRoot)
     2029{
     2030    if (pRoot)
     2031        return VINF_SUCCESS;
     2032    AssertReturn(!pRoot->pParent, VERR_INVALID_PARAMETER);
     2033    AssertReturn(!pRoot->pVM || pRoot != pRoot->pVM->cfgm.s.pRoot, VERR_ACCESS_DENIED);
     2034
     2035    CFGMR3RemoveNode(pRoot);
     2036    return VINF_SUCCESS;
    20202037}
    20212038
  • trunk/src/VBox/VMM/VMMR3/VMMR3.def

    r46474 r46792  
    44
    55;
    6 ; Copyright (C) 2010-2011 Oracle Corporation
     6; Copyright (C) 2010-2013 Oracle Corporation
    77;
    88; This file is part of VirtualBox Open Source Edition (OSE), as
     
    3030    CFGMR3Dump
    3131    CFGMR3CreateTree
     32    CFGMR3DestroyTree
    3233    CFGMR3GetValueName
    3334    CFGMR3GetName
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