Report unknown health when show dimm is called on unmanagable dimms
@@ -647,7 +647,12 @@ ShowDimms(
PRINTER_BUILD_KEY_PATH(pPath, DS_DIMM_INDEX_PATH, DimmIndex);
ReturnCode = MakeCapacityString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].Capacity, UnitsToDisplay, TRUE, &pCapacityStr);
+ if (MANAGEMENT_VALID_CONFIG != pDimms[DimmIndex].ManageabilityState) {
+ pHealthStr = HealthToString(gNvmDimmCliHiiHandle, HEALTH_UNKNOWN);
+ }
+ else {
pHealthStr = HealthToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].HealthState);
+ }
if (pDimms[DimmIndex].ErrorMask & DIMM_INFO_ERROR_SECURITY_INFO) {
pSecurityStr = CatSPrint(NULL, FORMAT_STR, UNKNOWN_ATTRIB_VAL);
@@ -801,7 +806,13 @@ ShowDimms(
/** Health State **/
if (ShowAll || (pDispOptions->DisplayOptionSet && ContainsValue(pDispOptions->pDisplayValues, HEALTH_STR))) {
+ if (MANAGEMENT_VALID_CONFIG != pDimms[DimmIndex].ManageabilityState) {
+ pHealthStr = HealthToString(gNvmDimmCliHiiHandle, HEALTH_UNKNOWN);
+ }
+ else {
pHealthStr = HealthToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].HealthState);
+ }
+
PRINTER_SET_KEY_VAL_WIDE_STR(pPrinterCtx, pPath, HEALTH_STR, pHealthStr);
FREE_POOL_SAFE(pHealthStr);
}
