/* This function will insert a device path package to package list firstly then invoke notification functions if any. This is a internal function. */
EFI_STATUS AddDevicePathPackage(IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN OUT HII_DATABASE_RECORD *DatabaseRecord)
/* This function will insert a device path package to package list firstly then invoke notification functions if any. This is a internal function. */
EFI_STATUS AddDevicePathPackage(IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN OUT HII_DATABASE_RECORD *DatabaseRecord)
{
  EFI_STATUS  Status;
  if (DevicePath == NULL) {
    return EFI_SUCCESS;
  }
  ASSERT (Private != NULL);
  ASSERT (DatabaseRecord != NULL);
  Status = InsertDevicePathPackage (
             DevicePath,
             NotifyType,
             DatabaseRecord->PackageList
             );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  return InvokeRegisteredFunction (
           Private,
           NotifyType,
           (VOID *)DatabaseRecord->PackageList->DevicePathPkg,
           EFI_HII_PACKAGE_DEVICE_PATH,
           DatabaseRecord->Handle
           );
}