/* Clears out all files from the Fv buffer in memory */
EFI_STATUS FvBufRemoveFileNew(IN OUT VOID *Fv, IN EFI_GUID *Name)
/* Clears out all files from the Fv buffer in memory */
EFI_STATUS FvBufRemoveFileNew(IN OUT VOID *Fv, IN EFI_GUID *Name)
{
  EFI_STATUS                  Status;
  EFI_FFS_FILE_HEADER*        FileToRm;
  UINTN                       FileToRmLength;
  Status = FvBufFindFileByName(
    Fv,
    Name,
    (VOID **)&FileToRm
    );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  FileToRmLength = FvBufGetFfsFileSize (FileToRm);
  CommonLibBinderSetMem (
    FileToRm,
    FileToRmLength,
    (((EFI_FIRMWARE_VOLUME_HEADER*)Fv)->Attributes & EFI_FVB2_ERASE_POLARITY)
      ? 0xFF : 0
    );
  return EFI_SUCCESS;
}