Update SetupBrowserDxe and BdsDxe to use an internal string for prompting string...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 8 May 2009 05:55:25 +0000 (05:55 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 8 May 2009 05:55:25 +0000 (05:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8263 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
MdeModulePkg/Universal/SetupBrowserDxe/Setup.c

index 8604608..6f153d0 100644 (file)
@@ -359,12 +359,18 @@ CallDeviceManager (
     }\r
 \r
     String = HiiGetString (HiiHandles[Index], FormSetTitle, NULL);\r
-    ASSERT (String != NULL);\r
+    if (String == NULL) {\r
+      String = HiiGetString (HiiHandle, STR_MISSING_STRING, NULL);\r
+      ASSERT (String != NULL);\r
+    }\r
     Token = HiiSetString (HiiHandle, 0, String, NULL);\r
     FreePool (String);\r
 \r
     String = HiiGetString (HiiHandles[Index], FormSetHelp, NULL);\r
-    ASSERT (String != NULL);\r
+    if (String == NULL) {\r
+      String = HiiGetString (HiiHandle, STR_MISSING_STRING, NULL);\r
+      ASSERT (String != NULL);\r
+    }\r
     TokenHelp = HiiSetString (HiiHandle, 0, String, NULL);\r
     FreePool (String);\r
 \r
index 0a067f0..15d4af3 100644 (file)
@@ -76,6 +76,8 @@ CHAR16            *gAdjustNumber;
 CHAR16            *gSaveChanges;\r
 CHAR16            *gOptionMismatch;\r
 \r
+CHAR16            *mUnknownString = L"!";\r
+\r
 CHAR16            gPromptBlockWidth;\r
 CHAR16            gOptionBlockWidth;\r
 CHAR16            gHelpBlockWidth;\r
@@ -650,7 +652,10 @@ GetToken (
   EFI_STRING  String;\r
 \r
   String = HiiGetString (HiiHandle, Token, NULL);\r
-  ASSERT (String != NULL);\r
+  if (String == NULL) {\r
+    String = AllocateCopyPool (sizeof (mUnknownString), mUnknownString);\r
+    ASSERT (String != NULL);\r
+  }\r
   return (CHAR16 *) String;\r
 }\r
 \r