Update UefiHiiLib to support new defined IFR related HII APIs.
Apply new defined IFR related HII APIs in PlatOverMngr, DriverSample, IScsiDxe and Setup drivers. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8066 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -323,40 +323,25 @@ InitializeConfigHdr (
|
||||
IN OUT FORMSET_STORAGE *Storage
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN StrBufferLen;
|
||||
CHAR16 *Name;
|
||||
|
||||
|
||||
if (Storage->Type == EFI_HII_VARSTORE_BUFFER) {
|
||||
Name = Storage->Name;
|
||||
} else {
|
||||
Name = NULL;
|
||||
}
|
||||
|
||||
StrBufferLen = 0;
|
||||
Status = ConstructConfigHdr (
|
||||
Storage->ConfigHdr,
|
||||
&StrBufferLen,
|
||||
&Storage->Guid,
|
||||
Name,
|
||||
FormSet->DriverHandle
|
||||
);
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
Storage->ConfigHdr = AllocateZeroPool (StrBufferLen);
|
||||
Status = ConstructConfigHdr (
|
||||
Storage->ConfigHdr,
|
||||
&StrBufferLen,
|
||||
&Storage->Guid,
|
||||
Name,
|
||||
FormSet->DriverHandle
|
||||
);
|
||||
|
||||
Storage->ConfigHdr = HiiConstructConfigHdr (
|
||||
&Storage->Guid,
|
||||
Name,
|
||||
FormSet->DriverHandle
|
||||
);
|
||||
|
||||
if (Storage->ConfigHdr == NULL) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Storage->ConfigRequest = AllocateCopyPool (StrBufferLen, Storage->ConfigHdr);
|
||||
Storage->ConfigRequest = AllocateCopyPool (StrSize (Storage->ConfigHdr), Storage->ConfigHdr);
|
||||
Storage->SpareStrLen = 0;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
@@ -39,7 +39,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/IfrSupportLib.h>
|
||||
#include <Library/HiiLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
|
||||
|
@@ -49,7 +49,6 @@
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
MemoryAllocationLib
|
||||
BaseLib
|
||||
@@ -59,9 +58,8 @@
|
||||
BaseMemoryLib
|
||||
DebugLib
|
||||
PrintLib
|
||||
IfrSupportLib
|
||||
HiiLib
|
||||
|
||||
|
||||
[Guids]
|
||||
gEfiIfrTianoGuid ## CONSUMES ## GUID
|
||||
gEfiIfrFrameworkGuid ## CONSUMES ## GUID
|
||||
|
Reference in New Issue
Block a user