* [edk2-redfish-client][PATCH v2 4/9] RedfishClientPkg/RedfishFeatureUtilityLib: Fix build error
@ 2023-06-06 12:32 Nickle Wang
0 siblings, 0 replies; only message in thread
From: Nickle Wang @ 2023-06-06 12:32 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Igor Kulchytskyy
Follow latest definition of EDKII_REDFISH_VALUE_TYPES and
rename all corresponding variable in RedfishFeatureUtilityLib.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
.../RedfishFeatureUtilityLib.c | 50 +++++++++----------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index ab0b650c..1e5c3f11 100644
--- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -308,7 +308,7 @@ ApplyFeatureSettingsStringType (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, Version, ConfigureLang, Status));
} else {
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_STRING) {
+ if (RedfishValue.Type != RedfishValueTypeString) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string type\n", __func__, Schema, Version, ConfigureLang));
return EFI_DEVICE_ERROR;
}
@@ -374,7 +374,7 @@ ApplyFeatureSettingsNumericType (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, Version, ConfigureLang, Status));
} else {
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_INTEGER) {
+ if (RedfishValue.Type != RedfishValueTypeInteger) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not numeric type\n", __func__, Schema, Version, ConfigureLang));
return EFI_DEVICE_ERROR;
}
@@ -439,7 +439,7 @@ ApplyFeatureSettingsBooleanType (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, Version, ConfigureLang, Status));
} else {
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_BOOLEAN) {
+ if (RedfishValue.Type != RedfishValueTypeBoolean) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not boolean type\n", __func__, Schema, Version, ConfigureLang));
return EFI_DEVICE_ERROR;
}
@@ -542,11 +542,11 @@ ApplyFeatureSettingsVagueType (
// Initial property data type and value.
//
if (CurrentVagueValuePtr->Value->DataType == RedfishCS_Vague_DataType_String) {
- PropertyDatatype = REDFISH_VALUE_TYPE_STRING;
+ PropertyDatatype = RedfishValueTypeString;
} else if (CurrentVagueValuePtr->Value->DataType == RedfishCS_Vague_DataType_Bool) {
- PropertyDatatype = REDFISH_VALUE_TYPE_BOOLEAN;
+ PropertyDatatype = RedfishValueTypeBoolean;
} else if (CurrentVagueValuePtr->Value->DataType == RedfishCS_Vague_DataType_Int64) {
- PropertyDatatype = REDFISH_VALUE_TYPE_INTEGER;
+ PropertyDatatype = RedfishValueTypeInteger;
} else {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s Unsupported Redfish property data type\n", __func__, Schema, Version, ConfigureLang));
goto ErrorContinue;
@@ -564,7 +564,7 @@ ApplyFeatureSettingsVagueType (
goto ErrorContinue;
}
- if (PropertyDatatype == REDFISH_VALUE_TYPE_STRING) {
+ if (PropertyDatatype == RedfishValueTypeString) {
//
// This is a string property.
//
@@ -587,7 +587,7 @@ ApplyFeatureSettingsVagueType (
} else {
DEBUG ((DEBUG_MANAGEABILITY, "%a, %a.%a %s value is: %a\n", __func__, Schema, Version, ConfigureKeyLang, RedfishValue.Value.Buffer, Status));
}
- } else if (PropertyDatatype == REDFISH_VALUE_TYPE_BOOLEAN) {
+ } else if (PropertyDatatype == RedfishValueTypeBoolean) {
//
// This is a boolean property.
//
@@ -619,7 +619,7 @@ ApplyFeatureSettingsVagueType (
} else {
DEBUG ((DEBUG_MANAGEABILITY, "%a, %a.%a %s value is: %a\n", __func__, Schema, Version, ConfigureKeyLang, (RedfishValue.Value.Boolean ? "True" : "False"), Status));
}
- } else if (PropertyDatatype == REDFISH_VALUE_TYPE_INTEGER) {
+ } else if (PropertyDatatype == RedfishValueTypeInteger) {
//
// This is a integer property.
//
@@ -695,12 +695,12 @@ FreeArrayTypeRedfishValue (
return;
}
- if ((RedfishValue->Type != REDFISH_VALUE_TYPE_INTEGER_ARRAY) && (RedfishValue->Type != REDFISH_VALUE_TYPE_STRING_ARRAY)) {
+ if ((RedfishValue->Type != RedfishValueTypeIntegerArray) && (RedfishValue->Type != RedfishValueTypeStringArray)) {
return;
}
switch (RedfishValue->Type) {
- case REDFISH_VALUE_TYPE_STRING_ARRAY:
+ case RedfishValueTypeStringArray:
for (Index = 0; Index < RedfishValue->ArrayCount; Index++) {
FreePool (RedfishValue->Value.StringArray[Index]);
}
@@ -709,12 +709,12 @@ FreeArrayTypeRedfishValue (
RedfishValue->Value.StringArray = NULL;
break;
- case REDFISH_VALUE_TYPE_INTEGER_ARRAY:
+ case RedfishValueTypeIntegerArray:
FreePool (RedfishValue->Value.IntegerArray);
RedfishValue->Value.IntegerArray = NULL;
break;
- case REDFISH_VALUE_TYPE_BOOLEAN_ARRAY:
+ case RedfishValueTypeBooleanArray:
FreePool (RedfishValue->Value.BooleanArray);
RedfishValue->Value.BooleanArray = NULL;
break;
@@ -763,7 +763,7 @@ ApplyFeatureSettingsStringArrayType (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, Version, ConfigureLang, Status));
} else {
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_STRING_ARRAY) {
+ if (RedfishValue.Type != RedfishValueTypeStringArray) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string array type\n", __func__, Schema, Version, ConfigureLang));
return EFI_DEVICE_ERROR;
}
@@ -866,7 +866,7 @@ ApplyFeatureSettingsNumericArrayType (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, Version, ConfigureLang, Status));
} else {
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_INTEGER_ARRAY) {
+ if (RedfishValue.Type != RedfishValueTypeIntegerArray) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string array type\n", __func__, Schema, Version, ConfigureLang));
return EFI_DEVICE_ERROR;
}
@@ -964,7 +964,7 @@ ApplyFeatureSettingsBooleanArrayType (
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s failed: %r\n", __func__, Schema, Version, ConfigureLang, Status));
} else {
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_BOOLEAN_ARRAY) {
+ if (RedfishValue.Type != RedfishValueTypeBooleanArray) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string array type\n", __func__, Schema, Version, ConfigureLang));
return EFI_DEVICE_ERROR;
}
@@ -2299,7 +2299,7 @@ GetPropertyStringValue (
return NULL;
}
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_STRING) {
+ if (RedfishValue.Type != RedfishValueTypeString) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string type\n", __func__, Schema, Version, ConfigureLang));
return NULL;
}
@@ -2357,7 +2357,7 @@ GetPropertyNumericValue (
return NULL;
}
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_INTEGER) {
+ if (RedfishValue.Type != RedfishValueTypeInteger) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not numeric type\n", __func__, Schema, Version, ConfigureLang));
return NULL;
}
@@ -2419,7 +2419,7 @@ GetPropertyBooleanValue (
return NULL;
}
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_BOOLEAN) {
+ if (RedfishValue.Type != RedfishValueTypeBoolean) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not boolean type\n", __func__, Schema, Version, ConfigureLang));
return NULL;
}
@@ -2520,7 +2520,7 @@ GetPropertyStringArrayValue (
return NULL;
}
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_STRING_ARRAY) {
+ if (RedfishValue.Type != RedfishValueTypeStringArray) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string array type\n", __func__, Schema, Version, ConfigureLang));
return NULL;
}
@@ -2591,7 +2591,7 @@ GetPropertyNumericArrayValue (
return NULL;
}
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_INTEGER_ARRAY) {
+ if (RedfishValue.Type != RedfishValueTypeIntegerArray) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string array type\n", __func__, Schema, Version, ConfigureLang));
return NULL;
}
@@ -2662,7 +2662,7 @@ GetPropertyBooleanArrayValue (
return NULL;
}
- if (RedfishValue.Type != REDFISH_VALUE_TYPE_BOOLEAN_ARRAY) {
+ if (RedfishValue.Type != RedfishValueTypeBooleanArray) {
DEBUG ((DEBUG_ERROR, "%a, %a.%a %s value is not string array type\n", __func__, Schema, Version, ConfigureLang));
return NULL;
}
@@ -2757,7 +2757,7 @@ NewEmptyPropKeyValueFromRedfishValue (
return NULL;
}
- if (RedfishValue->Type == REDFISH_VALUE_TYPE_BOOLEAN) {
+ if (RedfishValue->Type == RedfishValueTypeBoolean) {
VagueValue->DataType = RedfishCS_Vague_DataType_Bool;
DataSize = sizeof (BOOLEAN);
//
@@ -2766,11 +2766,11 @@ NewEmptyPropKeyValueFromRedfishValue (
//
Bool32 = (INT32)RedfishValue->Value.Boolean;
Data = (VOID *)&Bool32;
- } else if (RedfishValue->Type == REDFISH_VALUE_TYPE_INTEGER) {
+ } else if (RedfishValue->Type == RedfishValueTypeInteger) {
VagueValue->DataType = RedfishCS_Vague_DataType_Int64;
DataSize = sizeof (INT64);
Data = (VOID *)&RedfishValue->Value.Integer;
- } else if (RedfishValue->Type == REDFISH_VALUE_TYPE_STRING) {
+ } else if (RedfishValue->Type == RedfishValueTypeString) {
VagueValue->DataType = RedfishCS_Vague_DataType_String;
DataSize = AsciiStrSize (RedfishValue->Value.Buffer);
Data = (VOID *)RedfishValue->Value.Buffer;
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-06 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 12:32 [edk2-redfish-client][PATCH v2 4/9] RedfishClientPkg/RedfishFeatureUtilityLib: Fix build error Nickle Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox