Skip to content

Commit

Permalink
RedfishClientPkg/Memory: rename Redpath to ConfigLang
Browse files Browse the repository at this point in the history
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 <nicklew@nvidia.com>
  • Loading branch information
nicklela committed Aug 16, 2024
1 parent 6fa8d3b commit a09fd42
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
14 changes: 7 additions & 7 deletions RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -2526,17 +2526,17 @@ 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;
}

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';
Expand Down
17 changes: 9 additions & 8 deletions RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Redfish feature driver implementation - internal header file
(C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
Expand All @@ -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

0 comments on commit a09fd42

Please sign in to comment.