/* Note the CreateTime, LastAccessTime and ModificationTime fields in EFI_FILE_INFO are full zero as FV2 protocol has no corresponding info to fill. */
EFI_STATUS FvFsGetFileInfo(IN FV_FILESYSTEM_FILE_INFO *FvFileInfo, IN OUT UINTN *BufferSize, OUT EFI_FILE_INFO *FileInfo)
/* Note the CreateTime, LastAccessTime and ModificationTime fields in EFI_FILE_INFO are full zero as FV2 protocol has no corresponding info to fill. */
EFI_STATUS FvFsGetFileInfo(IN FV_FILESYSTEM_FILE_INFO *FvFileInfo, IN OUT UINTN *BufferSize, OUT EFI_FILE_INFO *FileInfo)
{
  UINTN  InfoSize;
  InfoSize = (UINTN)FvFileInfo->FileInfo.Size;
  if (*BufferSize < InfoSize) {
    *BufferSize = InfoSize;
    return EFI_BUFFER_TOO_SMALL;
  }
  CopyMem (FileInfo, &FvFileInfo->FileInfo, InfoSize);
  *BufferSize = InfoSize;
  return EFI_SUCCESS;
}