/* Get Formset_storage base on the input varstoreid info. */
FORMSET_STORAGE* GetFstStgFromVarId(IN FORM_BROWSER_FORMSET *FormSet, IN EFI_VARSTORE_ID VarStoreId)
/* Get Formset_storage base on the input varstoreid info. */
FORMSET_STORAGE* GetFstStgFromVarId(IN FORM_BROWSER_FORMSET *FormSet, IN EFI_VARSTORE_ID VarStoreId)
{
  FORMSET_STORAGE  *FormsetStorage;
  LIST_ENTRY       *Link;
  BOOLEAN          Found;
  Found          = FALSE;
  FormsetStorage = NULL;
  Link = GetFirstNode (&FormSet->StorageListHead);
  while (!IsNull (&FormSet->StorageListHead, Link)) {
    FormsetStorage = FORMSET_STORAGE_FROM_LINK (Link);
    if (FormsetStorage->VarStoreId == VarStoreId) {
      Found = TRUE;
      break;
    }
    Link = GetNextNode (&FormSet->StorageListHead, Link);
  }
  return Found ? FormsetStorage : NULL;
}