/* This function returns with the FV erase polarity. If the erase polarity for a bit is 1, the function return TRUE. */
EFI_STATUS GetErasePolarity(OUT BOOLEAN *ErasePolarity)
/* This function returns with the FV erase polarity. If the erase polarity for a bit is 1, the function return TRUE. */
EFI_STATUS GetErasePolarity(OUT BOOLEAN *ErasePolarity)
{
  EFI_STATUS  Status;
  if (mFvHeader == NULL || mFvLength == 0) {
    return EFI_ABORTED;
  }
  Status = VerifyFv (mFvHeader);
  if (EFI_ERROR (Status)) {
    return EFI_ABORTED;
  }
  if (ErasePolarity == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  if (mFvHeader->Attributes & EFI_FVB2_ERASE_POLARITY) {
    *ErasePolarity = TRUE;
  } else {
    *ErasePolarity = FALSE;
  }
  return EFI_SUCCESS;
}