/* Construct node list according to the AML handle. */
EFI_STATUS AmlConstructNodeList(IN EFI_AML_HANDLE *AmlHandle, IN EFI_AML_NODE_LIST *AmlRootNodeList, IN EFI_AML_NODE_LIST *AmlParentNodeList)
/* Construct node list according to the AML handle. */
EFI_STATUS AmlConstructNodeList(IN EFI_AML_HANDLE *AmlHandle, IN EFI_AML_NODE_LIST *AmlRootNodeList, IN EFI_AML_NODE_LIST *AmlParentNodeList)
{
  VOID               *NameString;
  EFI_AML_NODE_LIST  *AmlNodeList;
  if ((AmlHandle->AmlByteEncoding->Attribute & AML_IN_NAMESPACE) == 0) {
    return EFI_SUCCESS;
  }
  NameString = AmlGetObjectName (AmlHandle);
  if (NameString == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  AmlNodeList = AmlInsertNodeToTree (NameString, AmlHandle->Buffer, AmlHandle->Size, AmlRootNodeList, AmlParentNodeList);
  ASSERT (AmlNodeList != NULL);
  return AmlConstructNodeListForChild (AmlHandle, AmlRootNodeList, AmlNodeList);
}