aboutsummaryrefslogtreecommitdiffstats
path: root/UefiLessonsPkg
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2022-03-31 18:51:18 +0300
committerKonstantin Aladyshev <aladyshev22@gmail.com>2022-03-31 18:51:18 +0300
commit8a32d3e4f5ddf41a38fc3c1446561aa3b8ffdc5e (patch)
treef68bef59cbcaefb04bb9e7aab9130b2c461bfd61 /UefiLessonsPkg
parent0a64f63377ba7e6b695adc7becfb4d56e2ee723b (diff)
downloadUEFI-Lessons-8a32d3e4f5ddf41a38fc3c1446561aa3b8ffdc5e.tar.gz
UEFI-Lessons-8a32d3e4f5ddf41a38fc3c1446561aa3b8ffdc5e.tar.bz2
UEFI-Lessons-8a32d3e4f5ddf41a38fc3c1446561aa3b8ffdc5e.zip
Add a formset arg to DisplayHIIByGuid
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Diffstat (limited to 'UefiLessonsPkg')
-rw-r--r--UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c b/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c
index 87e7efe..2bd715f 100644
--- a/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c
+++ b/UefiLessonsPkg/DisplayHIIByGuid/DisplayHIIByGuid.c
@@ -18,21 +18,29 @@ ShellAppMain (
IN CHAR16 **Argv
)
{
- if (Argc != 2) {
+ if ((Argc < 2) || (Argc > 3)) {
Print(L"Usage:\n");
- Print(L" DisplayHIIByGuid <GUID>\n");
+ Print(L" DisplayHIIByGuid <Package list GUID> [<Formset classguid>]\n");
return EFI_INVALID_PARAMETER;
}
- GUID Guid;
- EFI_STATUS Status = StrToGuid(Argv[1], &Guid);
+ EFI_GUID PackageListGuid;
+ EFI_STATUS Status = StrToGuid(Argv[1], &PackageListGuid);
if (Status != RETURN_SUCCESS) {
- Print(L"Error! Can't convert input argument to GUID\n");
+ Print(L"Error! Can't convert <Package list GUID> argument to GUID\n");
return EFI_INVALID_PARAMETER;
}
+ EFI_GUID FormsetClassGuid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID;
+ if (Argc == 3) {
+ Status = StrToGuid(Argv[2], &FormsetClassGuid);
+ if (Status != RETURN_SUCCESS) {
+ Print(L"Error! Can't convert <Formset classguid> argument to GUID\n");
+ return EFI_INVALID_PARAMETER;
+ }
+ }
- EFI_HII_HANDLE* HiiHandles = HiiGetHiiHandles(&Guid);
+ EFI_HII_HANDLE* HiiHandles = HiiGetHiiHandles(&PackageListGuid);
EFI_HII_HANDLE* HiiHandle = HiiHandles;
UINTN HandleCount=0;
@@ -53,7 +61,7 @@ ShellAppMain (
FormBrowser2,
HiiHandles,
HandleCount,
- NULL,
+ &FormsetClassGuid,
0,
NULL,
NULL