From a09fd42735fb9f98915b1c7fa1a15d14c688d706 Mon Sep 17 00:00:00 2001 From: Nickle Wang Date: Wed, 14 Aug 2024 22:09:57 +0800 Subject: [PATCH] RedfishClientPkg/Memory: rename Redpath to ConfigLang To prevent confusion, Redpath is renamed to configure language in ReadMe. So, having this change to rename "Redpath" to "ConfigLang" in source code. Signed-off-by: Nickle Wang --- .../Memory/V1_7_1/Common/MemoryCommon.c | 14 +++++++------- .../Memory/V1_7_1/Common/MemoryCommon.h | 17 +++++++++-------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c index 39ec7ec0c..512f8cda5 100644 --- a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c @@ -2232,9 +2232,9 @@ ProvisioningMemoryResources ( return EFI_INVALID_PARAMETER; } - Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &UnifiedConfigureLangList); + Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, CONFIG_LANG_ARRAY_PATTERN, &UnifiedConfigureLangList); if (EFI_ERROR (Status) || (UnifiedConfigureLangList.Count == 0)) { - DEBUG ((DEBUG_ERROR, "%a, No HII question found with configure language: %s: %r\n", __func__, REDPATH_ARRAY_PATTERN, Status)); + DEBUG ((DEBUG_ERROR, "%a, No HII question found with configure language: %s: %r\n", __func__, CONFIG_LANG_ARRAY_PATTERN, Status)); return EFI_NOT_FOUND; } @@ -2381,7 +2381,7 @@ RedfishCheckResourceCommon ( return EFI_SUCCESS; } - Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigureLangList, &Count); + Status = RedfishPlatformConfigGetConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, CONFIG_LANG_ARRAY_PATTERN, &ConfigureLangList, &Count); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a, RedfishPlatformConfigGetConfigureLang failed: %r\n", __func__, Status)); return Status; @@ -2509,7 +2509,7 @@ RedfishIdentifyResourceCommon ( Supported = RedfishIdentifyResource (Private->Uri, Json); if (Supported) { - Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList); + Status = RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, CONFIG_LANG_ARRAY_PATTERN, &ConfigLangList); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a, RedfishFeatureGetUnifiedArrayTypeConfigureLang failed: %r\n", __func__, Status)); return Status; @@ -2526,7 +2526,7 @@ RedfishIdentifyResourceCommon ( } // EndOfChar = StrStr (ConfigLangList.List[0].ConfigureLang, L"}"); - Status = IsRedpathArray (ConfigLangList.List[0].ConfigureLang, NULL, &EndOfChar); + Status = IsConfigLangArray (ConfigLangList.List[0].ConfigureLang, NULL, &EndOfChar); if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) { ASSERT (FALSE); return EFI_DEVICE_ERROR; @@ -2534,9 +2534,9 @@ RedfishIdentifyResourceCommon ( if (Status != EFI_SUCCESS) { // - // This is not the collection redpath. + // This is not the collection config language. // - GetRedpathNodeByIndex (ConfigLangList.List[0].ConfigureLang, 0, &EndOfChar); + GetConfigLangNodeByIndex (ConfigLangList.List[0].ConfigureLang, 0, &EndOfChar); } *(++EndOfChar) = '\0'; diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h index 2120dc0e4..73d5d17ed 100644 --- a/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h @@ -2,6 +2,7 @@ Redfish feature driver implementation - internal header file (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
+ Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -15,13 +16,13 @@ // // Schema information. // -#define RESOURCE_SCHEMA "Memory" -#define RESOURCE_SCHEMA_MAJOR "1" -#define RESOURCE_SCHEMA_MINOR "7" -#define RESOURCE_SCHEMA_ERRATA "1" -#define RESOURCE_SCHEMA_VERSION "v1_7_1" -#define REDPATH_ARRAY_PATTERN L"/Memory/\\{.*\\}/" -#define REDPATH_ARRAY_PREFIX L"/Memory/" -#define RESOURCE_SCHEMA_FULL "x-UEFI-redfish-Memory.v1_7_1" +#define RESOURCE_SCHEMA "Memory" +#define RESOURCE_SCHEMA_MAJOR "1" +#define RESOURCE_SCHEMA_MINOR "7" +#define RESOURCE_SCHEMA_ERRATA "1" +#define RESOURCE_SCHEMA_VERSION "v1_7_1" +#define CONFIG_LANG_ARRAY_PATTERN L"/Memory/\\{.*\\}/" +#define CONFIG_LANG_ARRAY_PREFIX L"/Memory/" +#define RESOURCE_SCHEMA_FULL "x-UEFI-redfish-Memory.v1_7_1" #endif