/* This function extracts the file size info from the FileHandle's EFI_FILE_INFO data. */
EFI_STATUS EFIAPI FileHandleGetSize(IN EFI_FILE_HANDLE FileHandle, OUT UINT64 *Size)
/* This function extracts the file size info from the FileHandle's EFI_FILE_INFO data. */
EFI_STATUS EFIAPI FileHandleGetSize(IN EFI_FILE_HANDLE FileHandle, OUT UINT64 *Size)
{
  EFI_FILE_INFO  *FileInfo;
  if ((FileHandle == NULL) || (Size == NULL)) {
    return (EFI_INVALID_PARAMETER);
  }
  FileInfo = FileHandleGetInfo (FileHandle);
  if (FileInfo == NULL) {
    return (EFI_DEVICE_ERROR);
  }
  *Size = FileInfo->FileSize;
  FreePool (FileInfo);
  return (EFI_SUCCESS);
}