diff options
Diffstat (limited to 'MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c')
-rw-r--r-- | MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c b/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c index a2891de649..ea9079ea0f 100644 --- a/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c +++ b/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c @@ -14,7 +14,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "LibraryInternal.h"
-STATIC
+/**
+ Get the specified package from a package list based on an index.
+ The Buffer on output is updated to point to a package header in
+ the HiiPackageList. This is an internal function.
+
+ @param HiiPackageList The Package List Header.
+ @param PackageIndex The index of the package to get.
+ @param BufferLen The length of the package.
+ @param Buffer The starting address of package.
+
+ @retval EFI_SUCCESS This function completes successfully.
+ @retval EFI_NOT_FOUND The package is not found.
+
+**/
EFI_STATUS
GetPackageDataFromPackageList (
IN EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList,
@@ -27,7 +40,10 @@ GetPackageDataFromPackageList ( EFI_HII_PACKAGE_HEADER *Package;
UINT32 Offset;
UINT32 PackageListLength;
- EFI_HII_PACKAGE_HEADER PackageHeader = {0, 0};
+ EFI_HII_PACKAGE_HEADER PackageHeader;
+
+ PackageHeader.Length = 0;
+ PackageHeader.Type = 0;
ASSERT(HiiPackageList != NULL);
@@ -60,11 +76,29 @@ GetPackageDataFromPackageList ( return EFI_SUCCESS;
}
-STATIC
+/**
+ This is the internal worker function to update the data in
+ a form specified by FormSetGuid,
+
+ @param FormSetGuid The optional Formset GUID.
+ @param FormId The form ID>
+ @param Package The package header.
+ @param PackageLength The package length.
+ @param Label The label for the update.
+ @param Insert True if inserting opcode to the form.
+ @param Data The data payload.
+ @param TempBuffer The resultant package.
+ @param TempBufferSize The length of the resultant package.
+
+ @retval EFI_OUT_OF_RESOURCES If there is not enough memory to complete the operation.
+ @retval EFI_INVALID_PARAMETER If TempBuffer or TempBufferSize is NULL.
+ @retval EFI_SUCCESS The function completes successfully.
+
+**/
EFI_STATUS
EFIAPI
UpdateFormPackageData (
- IN EFI_GUID *FormSetGuid,
+ IN EFI_GUID *FormSetGuid, OPTIONAL
IN EFI_FORM_ID FormId,
IN EFI_HII_PACKAGE_HEADER *Package,
IN UINT32 PackageLength,
@@ -366,10 +400,11 @@ IfrLibUpdateForm ( /**
Configure the buffer accrording to ConfigBody strings.
- @param DefaultId the ID of default.
- @param Buffer the start address of buffer.
- @param BufferSize the size of buffer.
- @param Number the number of the strings.
+ @param Buffer The start address of buffer.
+ @param BufferSize The size of buffer.
+ @param Number The number of the strings.
+ @param ... Variable argument list for default value in <AltResp> format
+ generated by the tool.
@retval EFI_BUFFER_TOO_SMALL the BufferSize is too small to operate.
@retval EFI_INVALID_PARAMETER Buffer is NULL or BufferSize is 0.
|