]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / DeviceMngr / DeviceManager.c
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