]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Driver health entry in device manager page is not totally hidden, the original code...
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Feb 2010 09:40:43 +0000 (09:40 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Feb 2010 09:40:43 +0000 (09:40 +0000)
Dynamically create subtitle and action entry of driver health when driver health protocol is installed.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10047 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.Vfr

index 9e4fff6d33e9ab213105cb55fcfb2b00d78cf55d..b545b6c8499e2d914c8ae73f067e05a588c7b08e 100644 (file)
@@ -464,13 +464,24 @@ CallDeviceManager (
                 &NumHandles,\r
                 &DriverHealthHandles\r
                 );\r
+\r
   //\r
-  // If there are no drivers installed driver health protocol\r
+  // If there are no drivers installed driver health protocol, do not create driver health entry in UI\r
   //\r
-  if (NumHandles == 0) {\r
-    HiiSetString (HiiHandle, STRING_TOKEN (STR_DM_DRIVER_HEALTH_TITLE), GetStringById (STRING_TOKEN (STR_EMPTY_STRING)), NULL);\r
-    HiiSetString (HiiHandle, STRING_TOKEN (STR_DRIVER_HEALTH_ALL_HEALTHY), GetStringById (STRING_TOKEN (STR_EMPTY_STRING)), NULL);\r
-  } else {\r
+  if (NumHandles != 0) {\r
+    //\r
+    // If driver health protocol is installed, create Driver Health subtitle and entry\r
+    //\r
+    HiiCreateSubTitleOpCode (StartOpCodeHandle, STRING_TOKEN (STR_DM_DRIVER_HEALTH_TITLE), 0, 0, 0);\r
+    HiiCreateActionOpCode (\r
+      StartOpCodeHandle,                                // Container for dynamic created opcodes\r
+      DEVICE_MANAGER_KEY_DRIVER_HEALTH,                 // Question ID\r
+      STRING_TOKEN(STR_DRIVER_HEALTH_ALL_HEALTHY),      // Prompt text\r
+      STRING_TOKEN(STR_DRIVER_HEALTH_STATUS_HELP),      // Help text\r
+      EFI_IFR_FLAG_CALLBACK,                            // Question flag\r
+      0                                                 // Action String ID\r
+    );\r
+\r
     //\r
     // Check All Driver health status\r
     //\r
index c08ad2621478636ab0e5548037eaac23b3d00a1a..41a25e4a390c1178a80161a28cc8bccb12e788e5 100644 (file)
@@ -2,7 +2,7 @@
 //  \r
 //    Device Manager formset.\r
 //  \r
-//  Copyright (c) 2004 - 2009, Intel Corporation. <BR>\r
+//  Copyright (c) 2004 - 2010, Intel Corporation. <BR>\r
 //  All rights reserved. This program and the accompanying materials\r
 //  are licensed and made available under the terms and conditions of the BSD License\r
 //  which accompanies this distribution.  The full text of the license may be found at\r
@@ -66,16 +66,6 @@ formset
 \r
     label LABEL_DEVICES_LIST;\r
     label LABEL_END;\r
-    \r
-    subtitle text = STRING_TOKEN(STR_LAST_STRING);\r
-    subtitle text = STRING_TOKEN(STR_DM_DRIVER_HEALTH_TITLE); \r
-    \r
-    text\r
-      help   = STRING_TOKEN(STR_DRIVER_HEALTH_STATUS_HELP),\r
-      text   = STRING_TOKEN(STR_DRIVER_HEALTH_ALL_HEALTHY),\r
-      text   = STRING_TOKEN(STR_LAST_STRING),\r
-      flags  = INTERACTIVE,\r
-      key    = DEVICE_MANAGER_KEY_DRIVER_HEALTH;   \r
       \r
     subtitle text = STRING_TOKEN(STR_EMPTY_STRING);\r
 \r