/* Open the NvVars file for reading or writing */
EFI_STATUS FileHandleEmpty(IN EFI_FILE_HANDLE File)
/* Open the NvVars file for reading or writing */
EFI_STATUS FileHandleEmpty(IN EFI_FILE_HANDLE File)
{
  EFI_STATUS     Status;
  EFI_FILE_INFO  *FileInfo;
  FileInfo = FileHandleGetInfo (File);
  if (FileInfo == NULL) {
    return EFI_INVALID_PARAMETER;
  }
  if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) != 0) {
    FreePool (FileInfo);
    return EFI_INVALID_PARAMETER;
  }
  if (FileInfo->FileSize == 0) {
    FreePool (FileInfo);
    return EFI_SUCCESS;
  }
  FileInfo->FileSize = 0;
  Status             = FileHandleSetInfo (File, FileInfo);
  FreePool (FileInfo);
  return Status;
}