Lines Matching refs:pRoot

78 static void cfgmR3Dump(PCFGMNODE pRoot, unsigned iLevel, PCDBGFINFOHLP pHlp);
192 pVM->cfgm.s.pRoot = NULL;
204 PCFGMNODE pRoot = (PCFGMNODE)MMR3HeapAllocZ(pVM, MM_TAG_CFGM, sizeof(*pRoot));
205 if (!pRoot)
207 pRoot->pVM = pVM;
208 pRoot->cchName = 0;
209 pVM->cfgm.s.pRoot = pRoot;
239 CFGMR3RemoveNode(pVM->cfgm.s.pRoot);
240 pVM->cfgm.s.pRoot = NULL;
253 return pVM->cfgm.s.pRoot;
268 return pVM->cfgm.s.pRoot;
952 PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
953 AssertReturn(pRoot, VERR_WRONG_ORDER);
958 rc = CFGMR3InsertString(pRoot, "Name", "Default VM");
960 rc = CFGMR3InsertInteger(pRoot, "RamSize", 128U * _1M);
962 rc = CFGMR3InsertInteger(pRoot, "RamHoleSize", 512U * _1M);
964 rc = CFGMR3InsertInteger(pRoot, "TimerMillies", 10);
966 rc = CFGMR3InsertInteger(pRoot, "RawR3Enabled", 1);
969 rc = CFGMR3InsertInteger(pRoot, "RawR0Enabled", 1);
971 rc = CFGMR3InsertInteger(pRoot, "PATMEnabled", 1);
973 rc = CFGMR3InsertInteger(pRoot, "CSAMEnabled", 1);
980 rc = CFGMR3InsertNode(pRoot, "PDM", &pPdm);
998 rc = CFGMR3InsertNode(pRoot, "Devices", &pDevices);
1346 * @param pRoot The root of the tree to duplicate.
1349 VMMR3DECL(int) CFGMR3DuplicateSubTree(PCFGMNODE pRoot, PCFGMNODE *ppCopy)
1351 AssertPtrReturn(pRoot, VERR_INVALID_POINTER);
1356 PCFGMNODE pNewRoot = CFGMR3CreateTree(pRoot->pVM ? pRoot->pVM->pUVM : NULL);
1364 PCFGMNODE pSrcCur = pRoot;
1400 else if (pSrcCur == pRoot)
1414 } while (!pSrcCur->pNext && pSrcCur != pRoot);
1415 if (pSrcCur == pRoot)
1504 * @param pRoot The sub-tree to replace. This node will remain valid
1506 * @param pNewRoot The tree to replace @a pRoot with. This not will
1509 VMMR3DECL(int) CFGMR3ReplaceSubTree(PCFGMNODE pRoot, PCFGMNODE pNewRoot)
1514 AssertPtrReturn(pRoot, VERR_INVALID_POINTER);
1516 AssertReturn(pRoot != pNewRoot, VERR_INVALID_PARAMETER);
1518 AssertReturn(pNewRoot->pVM == pRoot->pVM, VERR_INVALID_PARAMETER);
1523 * Free the current properties fo pRoot.
1525 while (pRoot->pFirstChild)
1526 CFGMR3RemoveNode(pRoot->pFirstChild);
1528 while (pRoot->pFirstLeaf)
1529 cfgmR3RemoveLeaf(pRoot, pRoot->pFirstLeaf);
1534 pRoot->pFirstLeaf = pNewRoot->pFirstLeaf;
1535 pRoot->pFirstChild = pNewRoot->pFirstChild;
1536 for (PCFGMNODE pChild = pRoot->pFirstChild; pChild; pChild = pChild->pNext)
1537 pChild->pParent = pRoot;
1957 && pNode == pNode->pVM->cfgm.s.pRoot)
1958 pNode->pVM->cfgm.s.pRoot = NULL;
2040 * @param pRoot The root node of the tree.
2042 VMMR3DECL(int) CFGMR3DestroyTree(PCFGMNODE pRoot)
2044 if (!pRoot)
2046 AssertReturn(!pRoot->pParent, VERR_INVALID_PARAMETER);
2047 AssertReturn(!pRoot->pVM || pRoot != pRoot->pVM->cfgm.s.pRoot, VERR_ACCESS_DENIED);
2049 CFGMR3RemoveNode(pRoot);
3134 * @param pRoot The root node of the dump.
3136 VMMR3DECL(void) CFGMR3Dump(PCFGMNODE pRoot)
3140 cfgmR3Dump(pRoot, 0, DBGFR3InfoLogRelHlp());
3158 PCFGMNODE pRoot = pVM->cfgm.s.pRoot;
3161 int rc = cfgmR3ResolveNode(pRoot, pszArgs, &pRoot);
3172 pHlp->pfnPrintf(pHlp, "pRoot=%p:{", pRoot);
3173 cfgmR3DumpPath(pRoot, pHlp);
3175 cfgmR3Dump(pRoot, 0, pHlp);
3193 static void cfgmR3Dump(PCFGMNODE pRoot, unsigned iLevel, PCDBGFINFOHLP pHlp)
3199 cfgmR3DumpPath(pRoot, pHlp);
3200 pHlp->pfnPrintf(pHlp, "] (level %d)%s\n", iLevel, pRoot->fRestrictedRoot ? " (restricted root)" : "");
3207 for (pLeaf = CFGMR3GetFirstValue(pRoot); pLeaf; pLeaf = CFGMR3GetNextValue(pLeaf))
3209 for (pLeaf = CFGMR3GetFirstValue(pRoot); pLeaf; pLeaf = CFGMR3GetNextValue(pLeaf))
3250 for (PCFGMNODE pChild = CFGMR3GetFirstChild(pRoot); pChild; pChild = CFGMR3GetNextChild(pChild))
3256 Assert(pChild->pParent == pRoot);