Update configrequest string at runtime for dynamic created question.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15247 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2014-02-18 10:53:57 +00:00
committed by ydong10
parent a6c0ad816a
commit 27c304f442
3 changed files with 32 additions and 97 deletions

View File

@@ -1957,70 +1957,6 @@ IsNvUpdateRequiredForForm (
return FALSE;
}
/**
Check whether the storage data for current form set is changed.
@param FormSet FormSet data structure.
@retval TRUE Data is changed.
@retval FALSE Data is not changed.
**/
BOOLEAN
IsStorageDataChangedForFormSet (
IN FORM_BROWSER_FORMSET *FormSet
)
{
LIST_ENTRY *Link;
FORMSET_STORAGE *Storage;
BROWSER_STORAGE *BrowserStorage;
CHAR16 *ConfigRespNew;
CHAR16 *ConfigRespOld;
BOOLEAN RetVal;
RetVal = FALSE;
ConfigRespNew = NULL;
ConfigRespOld = NULL;
//
// Request current settings from Configuration Driver
//
Link = GetFirstNode (&FormSet->StorageListHead);
while (!IsNull (&FormSet->StorageListHead, Link)) {
Storage = FORMSET_STORAGE_FROM_LINK (Link);
Link = GetNextNode (&FormSet->StorageListHead, Link);
BrowserStorage = Storage->BrowserStorage;
if (BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE) {
continue;
}
if (Storage->ElementCount == 0) {
continue;
}
StorageToConfigResp (BrowserStorage, &ConfigRespNew, Storage->ConfigRequest, TRUE);
StorageToConfigResp (BrowserStorage, &ConfigRespOld, Storage->ConfigRequest, FALSE);
ASSERT (ConfigRespNew != NULL && ConfigRespOld != NULL);
if (StrCmp (ConfigRespNew, ConfigRespOld) != 0) {
RetVal = TRUE;
}
FreePool (ConfigRespNew);
ConfigRespNew = NULL;
FreePool (ConfigRespOld);
ConfigRespOld = NULL;
if (RetVal) {
break;
}
}
return RetVal;
}
/**
Find menu which will show next time.