/* NOTE: This is an internal function which does not propagate the size when a new node is added. */
EFI_STATUS EFIAPI AmlVarListAddTailInternal(IN AML_NODE_HEADER *ParentNode, IN AML_NODE_HEADER *NewNode)
/* NOTE: This is an internal function which does not propagate the size when a new node is added. */
EFI_STATUS EFIAPI AmlVarListAddTailInternal(IN AML_NODE_HEADER *ParentNode, IN AML_NODE_HEADER *NewNode)
{
  LIST_ENTRY  *ChildrenList;
  if ((!IS_AML_ROOT_NODE (ParentNode)     &&
       !IS_AML_OBJECT_NODE (ParentNode))  ||
      (!IS_AML_DATA_NODE (NewNode)        &&
       !IS_AML_OBJECT_NODE (NewNode))     ||
      !AML_NODE_IS_DETACHED (NewNode))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  ChildrenList = AmlNodeGetVariableArgList (ParentNode);
  if (ChildrenList == NULL) {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  InsertTailList (ChildrenList, &NewNode->Link);
  NewNode->Parent = ParentNode;
  return EFI_SUCCESS;
}