/* AmlCodeGenNamePackage ("PKG0", ParentNode, NewObjectNode) is equivalent of the following ASL code: Name(PKG0, Package () {}) */
EFI_STATUS EFIAPI AmlCodeGenNamePackage(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode, OPTIONAL OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
/* AmlCodeGenNamePackage ("PKG0", ParentNode, NewObjectNode) is equivalent of the following ASL code: Name(PKG0, Package () {}) */
EFI_STATUS EFIAPI AmlCodeGenNamePackage(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode, OPTIONAL OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
{
  EFI_STATUS       Status;
  AML_OBJECT_NODE  *PackageNode;
  if ((NameString == NULL)  ||
      ((ParentNode == NULL) && (NewObjectNode == NULL)))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  Status = AmlCodeGenPackage (&PackageNode);
  if (EFI_ERROR (Status)) {
    ASSERT (0);
    return Status;
  }
  Status = AmlCodeGenName (
             NameString,
             PackageNode,
             ParentNode,
             NewObjectNode
             );
  if (EFI_ERROR (Status)) {
    ASSERT (0);
    AmlDeleteTree ((AML_NODE_HEADER *)PackageNode);
  }
  return Status;
}