diff options
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 4a6758a5e4..cc9896959b 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -5541,8 +5541,9 @@ SaveBrowserContext ( VOID
)
{
- BROWSER_CONTEXT *Context;
- FORM_ENTRY_INFO *MenuList;
+ BROWSER_CONTEXT *Context;
+ FORM_ENTRY_INFO *MenuList;
+ FORM_BROWSER_FORMSET *FormSet;
gBrowserContextCount++;
if (gBrowserContextCount == 1) {
@@ -5585,6 +5586,17 @@ SaveBrowserContext ( }
//
+ // Save formset list.
+ //
+ InitializeListHead(&Context->FormSetList);
+ while (!IsListEmpty (&gBrowserFormSetList)) {
+ FormSet = FORM_BROWSER_FORMSET_FROM_LINK (gBrowserFormSetList.ForwardLink);
+ RemoveEntryList (&FormSet->Link);
+
+ InsertTailList(&Context->FormSetList, &FormSet->Link);
+ }
+
+ //
// Insert to FormBrowser context list
//
InsertHeadList (&gBrowserContextList, &Context->Link);
@@ -5602,7 +5614,8 @@ RestoreBrowserContext ( {
LIST_ENTRY *Link;
BROWSER_CONTEXT *Context;
- FORM_ENTRY_INFO *MenuList;
+ FORM_ENTRY_INFO *MenuList;
+ FORM_BROWSER_FORMSET *FormSet;
ASSERT (gBrowserContextCount != 0);
gBrowserContextCount--;
@@ -5645,6 +5658,16 @@ RestoreBrowserContext ( }
//
+ // Restore the Formset data.
+ //
+ while (!IsListEmpty (&Context->FormSetList)) {
+ FormSet = FORM_BROWSER_FORMSET_FROM_LINK (Context->FormSetList.ForwardLink);
+ RemoveEntryList (&FormSet->Link);
+
+ InsertTailList(&gBrowserFormSetList, &FormSet->Link);
+ }
+
+ //
// Remove from FormBrowser context list
//
RemoveEntryList (&Context->Link);
|