/* Returns information about the regular expression syntax types supported by the implementation. */
EFI_STATUS EFIAPI RegularExpressionGetInfo(IN EFI_REGULAR_EXPRESSION_PROTOCOL *This, IN OUT UINTN *RegExSyntaxTypeListSize, OUT EFI_REGEX_SYNTAX_TYPE *RegExSyntaxTypeList)
/* Returns information about the regular expression syntax types supported by the implementation. */
EFI_STATUS EFIAPI RegularExpressionGetInfo(IN EFI_REGULAR_EXPRESSION_PROTOCOL *This, IN OUT UINTN *RegExSyntaxTypeListSize, OUT EFI_REGEX_SYNTAX_TYPE *RegExSyntaxTypeList)
{
  UINTN  SyntaxSize;
  UINTN  Index;
  if ((This == NULL) || (RegExSyntaxTypeListSize == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  if ((*RegExSyntaxTypeListSize != 0) && (RegExSyntaxTypeList == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  SyntaxSize = ARRAY_SIZE (mSupportedSyntaxes) * sizeof (**mSupportedSyntaxes);
  if (*RegExSyntaxTypeListSize < SyntaxSize) {
    *RegExSyntaxTypeListSize = SyntaxSize;
    return EFI_BUFFER_TOO_SMALL;
  }
  for (Index = 0; Index < ARRAY_SIZE (mSupportedSyntaxes); ++Index) {
    CopyMem (&RegExSyntaxTypeList[Index], mSupportedSyntaxes[Index], sizeof (**mSupportedSyntaxes));
  }
  *RegExSyntaxTypeListSize = SyntaxSize;
  return EFI_SUCCESS;
}