/* Given an EFI_FILE_INFO object received in an EFI_FILE_PROTOCOL.SetInfo() call, determine whether updating the size of the file is necessary, relative to an EFI_FILE_INFO object describing the current state of the file. */
VOID VirtioFsGetFuseSizeUpdate(IN EFI_FILE_INFO *Info, IN EFI_FILE_INFO *NewInfo, OUT BOOLEAN *Update, OUT UINT64 *Size)
/* Given an EFI_FILE_INFO object received in an EFI_FILE_PROTOCOL.SetInfo() call, determine whether updating the size of the file is necessary, relative to an EFI_FILE_INFO object describing the current state of the file. */
VOID VirtioFsGetFuseSizeUpdate(IN EFI_FILE_INFO *Info, IN EFI_FILE_INFO *NewInfo, OUT BOOLEAN *Update, OUT UINT64 *Size)
{
  BOOLEAN  IsDirectory;
  IsDirectory = (BOOLEAN)((Info->Attribute & EFI_FILE_DIRECTORY) != 0);
  if (IsDirectory || (Info->FileSize == NewInfo->FileSize)) {
    *Update = FALSE;
    return;
  }
  *Update = TRUE;
  *Size   = NewInfo->FileSize;
}