mirror of https://github.com/acidanthera/audk.git
Update HiiDataBase to fix parsing Hii package error. Some HiiPackages have no varstore and question, they has no the built in default value.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8314 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
84f9a9ec8f
commit
76c2425177
|
@ -286,18 +286,17 @@ HiiConstructConfigHdr (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
It has the many same logic to HiiValidateSetting API.
|
|
||||||
|
|
||||||
Reset the default value specified by DefaultId to the driver
|
Reset the default value specified by DefaultId to the driver
|
||||||
configuration got by Request string.
|
configuration got by Request string.
|
||||||
NULL request string support depends on the ExtractConfig interface of
|
|
||||||
|
NULL request string support depends on the ExportConfig interface of
|
||||||
HiiConfigRouting protocol in UEFI specification.
|
HiiConfigRouting protocol in UEFI specification.
|
||||||
|
|
||||||
@param EFI_STRING Request A null-terminated Unicode string in
|
@param Request A null-terminated Unicode string in
|
||||||
<MultiConfigRequest> format. It can be NULL.
|
<MultiConfigRequest> format. It can be NULL.
|
||||||
If it is NULL, all configuration for the
|
If it is NULL, all configuration for the
|
||||||
entirety of the current HII database will be reset.
|
entirety of the current HII database will be reset.
|
||||||
@param UINT16 DefaultId Specifies the type of defaults to retrieve.
|
@param DefaultId Specifies the type of defaults to retrieve.
|
||||||
|
|
||||||
@retval TURE The default value is set successfully.
|
@retval TURE The default value is set successfully.
|
||||||
@retval FALSE The default value can't be found and set.
|
@retval FALSE The default value can't be found and set.
|
||||||
|
@ -311,15 +310,14 @@ HiiSetToDefaults (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Validate the current configuration by parsing HII form IFR opcode.
|
Validate the current configuration by parsing HII form IFR opcode.
|
||||||
It can share the most logic with HiiSetToDefaults.
|
|
||||||
|
|
||||||
NULL request string support depends on the ExtractConfig interface of
|
NULL request string support depends on the ExtractConfig interface of
|
||||||
HiiConfigRouting protocol in UEFI specification.
|
HiiConfigRouting protocol in UEFI specification.
|
||||||
|
|
||||||
@param EFI_STRING Request A null-terminated Unicode string in
|
@param Request A null-terminated Unicode string in
|
||||||
<MultiConfigRequest> format. It can be NULL.
|
<MultiConfigRequest> format. It can be NULL.
|
||||||
If it is NULL, all current configuration for the
|
If it is NULL, all current configuration for the
|
||||||
entirety of the current HII database will be validated.
|
entirety of the current HII database will be validated.
|
||||||
|
|
||||||
@retval TURE Current configuration is valid.
|
@retval TURE Current configuration is valid.
|
||||||
@retval FALSE Current configuration is invalid.
|
@retval FALSE Current configuration is invalid.
|
||||||
|
|
|
@ -1177,6 +1177,11 @@ InternalHiiValidateCurrentSetting (
|
||||||
}
|
}
|
||||||
Link = Link->ForwardLink;
|
Link = Link->ForwardLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsListEmpty (&CurrentBlockArray->Entry)) {
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// 2. Check IFR value is in block data, then Validate Vaule
|
// 2. Check IFR value is in block data, then Validate Vaule
|
||||||
|
@ -1233,7 +1238,7 @@ InternalHiiValidateCurrentSetting (
|
||||||
// Check the matched VarStoreId is found.
|
// Check the matched VarStoreId is found.
|
||||||
//
|
//
|
||||||
if (IfrVarStore == NULL) {
|
if (IfrVarStore == NULL) {
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_SUCCESS;
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1580,7 +1585,7 @@ BOOLEAN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InternalHiiIfrValueAction (
|
InternalHiiIfrValueAction (
|
||||||
IN CONST EFI_STRING Request, OPTIONAL
|
IN CONST EFI_STRING Request, OPTIONAL
|
||||||
IN UINT16 DefaultId,
|
IN UINT16 DefaultId,
|
||||||
IN UINT8 ActionType
|
IN UINT8 ActionType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1738,6 +1743,7 @@ InternalHiiIfrValueAction (
|
||||||
// Its default value and validating can't execute by parsing IFR data.
|
// Its default value and validating can't execute by parsing IFR data.
|
||||||
// Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path.
|
// Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path.
|
||||||
//
|
//
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
goto NextConfigAltResp;
|
goto NextConfigAltResp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1819,7 +1825,8 @@ InternalHiiIfrValueAction (
|
||||||
// Not found the matched default string ID
|
// Not found the matched default string ID
|
||||||
//
|
//
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
Status = EFI_SUCCESS;
|
||||||
|
goto NextConfigAltResp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1838,7 +1845,8 @@ InternalHiiIfrValueAction (
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
Status = EFI_SUCCESS;
|
||||||
|
goto NextConfigAltResp;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1861,6 +1869,7 @@ InternalHiiIfrValueAction (
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NextConfigAltResp:
|
||||||
//
|
//
|
||||||
// Free the allocated pacakge buffer and the got ConfigResp string.
|
// Free the allocated pacakge buffer and the got ConfigResp string.
|
||||||
//
|
//
|
||||||
|
@ -1868,11 +1877,12 @@ InternalHiiIfrValueAction (
|
||||||
FreePool (HiiPackageList);
|
FreePool (HiiPackageList);
|
||||||
HiiPackageList = NULL;
|
HiiPackageList = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ConfigResp != NULL) {
|
||||||
|
FreePool (ConfigResp);
|
||||||
|
ConfigResp = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
FreePool (ConfigResp);
|
|
||||||
ConfigResp = NULL;
|
|
||||||
|
|
||||||
NextConfigAltResp:
|
|
||||||
//
|
//
|
||||||
// Free the allocated buffer.
|
// Free the allocated buffer.
|
||||||
//
|
//
|
||||||
|
|
|
@ -418,6 +418,7 @@ ExtractConfig (
|
||||||
|
|
||||||
if (Request == NULL) {
|
if (Request == NULL) {
|
||||||
FreePool (ConfigRequest);
|
FreePool (ConfigRequest);
|
||||||
|
*Progress = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
|
@ -1728,6 +1728,13 @@ GetFullStringFromHiiFormPackages (
|
||||||
|
|
||||||
PackageOffset += PacakgeHeader.Length;
|
PackageOffset += PacakgeHeader.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// No requested varstore in IFR data and directly return
|
||||||
|
//
|
||||||
|
if (VarStorageData->Size == 0) {
|
||||||
|
goto Done;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// 3. Construct Request Element (Block Name) for 2.1 and 2.2 case.
|
// 3. Construct Request Element (Block Name) for 2.1 and 2.2 case.
|
||||||
|
@ -2204,6 +2211,13 @@ HiiConfigRoutingExtractConfig (
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
goto Done;
|
goto Done;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Not any request block is found.
|
||||||
|
//
|
||||||
|
if (StrStr (ConfigRequest, L"&OFFSET=") == NULL) {
|
||||||
|
AccessResults = AllocateCopyPool (StrSize (ConfigRequest), ConfigRequest);
|
||||||
|
goto NextConfigString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2261,7 +2275,8 @@ HiiConfigRoutingExtractConfig (
|
||||||
FreePool (DefaultResults);
|
FreePool (DefaultResults);
|
||||||
DefaultResults = NULL;
|
DefaultResults = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NextConfigString:
|
||||||
if (!FirstElement) {
|
if (!FirstElement) {
|
||||||
Status = AppendToMultiString (Results, L"&");
|
Status = AppendToMultiString (Results, L"&");
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
@ -2292,6 +2307,7 @@ HiiConfigRoutingExtractConfig (
|
||||||
Done:
|
Done:
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
FreePool (*Results);
|
FreePool (*Results);
|
||||||
|
*Results = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigRequest != NULL) {
|
if (ConfigRequest != NULL) {
|
||||||
|
@ -2783,7 +2799,7 @@ HiiBlockToConfig (
|
||||||
StringPtr++;
|
StringPtr++;
|
||||||
}
|
}
|
||||||
if (*StringPtr == 0) {
|
if (*StringPtr == 0) {
|
||||||
*Progress = StringPtr;
|
*Progress = StringPtr - 1;
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
@ -2792,7 +2808,7 @@ HiiBlockToConfig (
|
||||||
StringPtr++;
|
StringPtr++;
|
||||||
}
|
}
|
||||||
if (*StringPtr == 0) {
|
if (*StringPtr == 0) {
|
||||||
*Progress = StringPtr;
|
*Progress = StringPtr - 1;
|
||||||
Status = EFI_INVALID_PARAMETER;
|
Status = EFI_INVALID_PARAMETER;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
@ -2947,7 +2963,10 @@ HiiBlockToConfig (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
FreePool (*Config);
|
if (*Config != NULL) {
|
||||||
|
FreePool (*Config);
|
||||||
|
*Config = NULL;
|
||||||
|
}
|
||||||
if (ValueStr != NULL) {
|
if (ValueStr != NULL) {
|
||||||
FreePool (ValueStr);
|
FreePool (ValueStr);
|
||||||
}
|
}
|
||||||
|
@ -3401,7 +3420,7 @@ HiiGetAltCfg (
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
|
*AltCfgResp = NULL;
|
||||||
if (!EFI_ERROR (Status) && (Result != NULL)) {
|
if (!EFI_ERROR (Status) && (Result != NULL)) {
|
||||||
//
|
//
|
||||||
// Copy the <ConfigHdr> and <ConfigBody>
|
// Copy the <ConfigHdr> and <ConfigBody>
|
||||||
|
|
Loading…
Reference in New Issue