.../ConverterLib/include/RedfishDataTypeDef.h | 40 +++++++++---------- .../Library/RedfishFeatureUtilityLib.h | 17 +------- .../Protocol/EdkIIRedfishInterchangeData.h | 33 ++++++++++----- 3 files changed, 45 insertions(+), 45 deletions(-)
Move REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG and
REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST from
RedfishFeatureUtilityLib.h to
EdkIIRedfishInterchangeData.h. Also, remove
unnecessary jansson.h in RedfishDataTypeDef.h.
Signed-off-by: Simon Wang <simowang@nvidia.com>
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
---
.../ConverterLib/include/RedfishDataTypeDef.h | 40 +++++++++----------
.../Library/RedfishFeatureUtilityLib.h | 17 +-------
.../Protocol/EdkIIRedfishInterchangeData.h | 33 ++++++++++-----
3 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h b/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h
index 23d13a854c..c759428ab6 100644
--- a/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h
+++ b/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h
@@ -1,6 +1,7 @@
/** @file
(C) Copyright 2018-2021 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -8,29 +9,28 @@
Copyright 2019-2021 Distributed Management Task Force, Inc. All rights reserved.
License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md
**/
+
#ifndef REDFISH_CS_DATA_TYPE_H_
#define REDFISH_CS_DATA_TYPE_H_
-#include <jansson.h>
-
-typedef char RedfishCS_char;
-typedef int RedfishCS_bool;
-typedef signed char RedfishCS_int8;
-typedef unsigned char RedfishCS_uint8;
-typedef int RedfishCS_int16;
-typedef int RedfishCS_int;
-typedef unsigned int RedfishCS_uint16;
-typedef long int RedfishCS_int32;
-typedef unsigned long int RedfishCS_uint32;
-typedef long long RedfishCS_int64;
-typedef unsigned long long RedfishCS_uint64;
-typedef void RedfishCS_void;
-
-#define RedfishCS_boolean_false 0
-#define RedfishCS_boolean_true 1
+typedef char RedfishCS_char;
+typedef int RedfishCS_bool;
+typedef signed char RedfishCS_int8;
+typedef unsigned char RedfishCS_uint8;
+typedef int RedfishCS_int16;
+typedef int RedfishCS_int;
+typedef unsigned int RedfishCS_uint16;
+typedef long int RedfishCS_int32;
+typedef unsigned long int RedfishCS_uint32;
+typedef long long RedfishCS_int64;
+typedef unsigned long long RedfishCS_uint64;
+typedef void RedfishCS_void;
+
+#define RedfishCS_boolean_false 0
+#define RedfishCS_boolean_true 1
typedef RedfishCS_int64 RedfishCS_status;
-#define RedfishCS_status_success 0
+#define RedfishCS_status_success 0
#define RedfishCS_status_unsupported -1
#define RedfishCS_status_invalid_parameter -2
#define RedfishCS_status_insufficient_memory -3
@@ -39,8 +39,8 @@ typedef RedfishCS_int64 RedfishCS_status;
typedef struct _RedfishCS_Link RedfishCS_Link;
struct _RedfishCS_Link {
- RedfishCS_Link *BackLink;
- RedfishCS_Link *ForwardLink;
+ RedfishCS_Link *BackLink;
+ RedfishCS_Link *ForwardLink;
};
#endif
diff --git a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
index 1429643272..e2f728b26a 100644
--- a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
+++ b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
@@ -13,26 +13,11 @@
#include <Library/RedfishLib.h>
#include <Protocol/EdkIIRedfishPlatformConfig.h>
+#include <Protocol/EdkIIRedfishInterchangeData.h>
#include <RedfishJsonStructure/RedfishCsCommon.h>
#define REDFISH_ENABLE_SYSTEM_REBOOT() PcdSetBoolS(PcdRedfishSystemRebootRequired, TRUE)
-//
-// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG
-//
-typedef struct {
- UINTN Index;
- EFI_STRING ConfigureLang;
-} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG;
-
-//
-// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST
-//
-typedef struct {
- UINTN Count;
- REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG *List;
-} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST;
-
/**
Read redfish resource by given resource URI.
diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h
index e8d0462fb7..89708eb8f1 100644
--- a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h
@@ -2,6 +2,7 @@
This file defines the EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL interface.
(C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -10,7 +11,21 @@
#ifndef EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_
#define EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_
-#include <Library/RedfishFeatureUtilityLib.h>
+//
+// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG
+//
+typedef struct {
+ UINTN Index;
+ EFI_STRING ConfigureLang;
+} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG;
+
+//
+// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST
+//
+typedef struct {
+ UINTN Count;
+ REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG *List;
+} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST;
typedef struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL;
@@ -27,15 +42,15 @@ typedef enum {
} RESOURCE_INFORMATION_EXCHANGE_TYPE;
typedef struct {
- RESOURCE_INFORMATION_EXCHANGE_TYPE Type;
- EFI_STRING ParentUri; ///< The parent URI (in configure language) of the resource to process.
- EFI_STRING PropertyName; ///< The property name of the resource to process.
- EFI_STRING FullUri; ///< The full URI (in configure language) of the resource to process.
+ RESOURCE_INFORMATION_EXCHANGE_TYPE Type;
+ EFI_STRING ParentUri; ///< The parent URI (in configure language) of the resource to process.
+ EFI_STRING PropertyName; ///< The property name of the resource to process.
+ EFI_STRING FullUri; ///< The full URI (in configure language) of the resource to process.
} RESOURCE_INFORMATION_SEND;
typedef struct {
- RESOURCE_INFORMATION_EXCHANGE_TYPE Type;
- REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST ConfigureLanguageList;
+ RESOURCE_INFORMATION_EXCHANGE_TYPE Type;
+ REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST ConfigureLanguageList;
} RESOURCE_INFORMATION_RETURNED;
typedef struct {
@@ -44,9 +59,9 @@ typedef struct {
} RESOURCE_INFORMATION_EXCHANGE;
struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL {
- RESOURCE_INFORMATION_EXCHANGE *ResourceInformationExchage;
+ RESOURCE_INFORMATION_EXCHANGE *ResourceInformationExchage;
};
-extern EFI_GUID gEdkIIRedfishFeatureInterchangeDataProtocolGuid;
+extern EFI_GUID gEdkIIRedfishFeatureInterchangeDataProtocolGuid;
#endif
--
2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101258): https://edk2.groups.io/g/devel/message/101258
Mute This Topic: https://groups.io/mt/97644705/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
[AMD Official Use Only - General] Reviewed-by: Abner Chang <abner.chang@amd.com> > -----Original Message----- > From: Simon Wang <simowang@nvidia.com> > Sent: Tuesday, March 14, 2023 7:39 PM > To: devel@edk2.groups.io > Cc: Nickle Wang <nicklew@nvidia.com>; Chang, Abner > <Abner.Chang@amd.com>; Igor Kulchytskyy <igork@ami.com>; Nick > Ramirez <nramirez@nvidia.com> > Subject: [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Reduce the > header file dependency. > > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. > > > Move REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG and > REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST from > RedfishFeatureUtilityLib.h to EdkIIRedfishInterchangeData.h. Also, remove > unnecessary jansson.h in RedfishDataTypeDef.h. > > Signed-off-by: Simon Wang <simowang@nvidia.com> > Cc: Nickle Wang <nicklew@nvidia.com> > Cc: Abner Chang <abner.chang@amd.com> > Cc: Igor Kulchytskyy <igork@ami.com> > Cc: Nick Ramirez <nramirez@nvidia.com> > --- > .../ConverterLib/include/RedfishDataTypeDef.h | 40 +++++++++---------- > .../Library/RedfishFeatureUtilityLib.h | 17 +------- > .../Protocol/EdkIIRedfishInterchangeData.h | 33 ++++++++++----- > 3 files changed, 45 insertions(+), 45 deletions(-) > > diff --git a/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h > b/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h > index 23d13a854c..c759428ab6 100644 > --- a/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h > +++ b/RedfishClientPkg/ConverterLib/include/RedfishDataTypeDef.h > @@ -1,6 +1,7 @@ > /** @file > > (C) Copyright 2018-2021 Hewlett Packard Enterprise Development LP<BR> > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -8,29 +9,28 @@ > Copyright 2019-2021 Distributed Management Task Force, Inc. All rights > reserved. > License: BSD 3-Clause License. For full text see link: > https://github.com/DMTF/Redfish-JSON-C-Struct- > Converter/blob/master/LICENSE.md > **/ > + > #ifndef REDFISH_CS_DATA_TYPE_H_ > #define REDFISH_CS_DATA_TYPE_H_ > > -#include <jansson.h> > - > -typedef char RedfishCS_char; > -typedef int RedfishCS_bool; > -typedef signed char RedfishCS_int8; > -typedef unsigned char RedfishCS_uint8; > -typedef int RedfishCS_int16; > -typedef int RedfishCS_int; > -typedef unsigned int RedfishCS_uint16; > -typedef long int RedfishCS_int32; > -typedef unsigned long int RedfishCS_uint32; > -typedef long long RedfishCS_int64; > -typedef unsigned long long RedfishCS_uint64; > -typedef void RedfishCS_void; > - > -#define RedfishCS_boolean_false 0 > -#define RedfishCS_boolean_true 1 > +typedef char RedfishCS_char; > +typedef int RedfishCS_bool; > +typedef signed char RedfishCS_int8; > +typedef unsigned char RedfishCS_uint8; > +typedef int RedfishCS_int16; > +typedef int RedfishCS_int; > +typedef unsigned int RedfishCS_uint16; > +typedef long int RedfishCS_int32; > +typedef unsigned long int RedfishCS_uint32; > +typedef long long RedfishCS_int64; > +typedef unsigned long long RedfishCS_uint64; > +typedef void RedfishCS_void; > + > +#define RedfishCS_boolean_false 0 > +#define RedfishCS_boolean_true 1 > > typedef RedfishCS_int64 RedfishCS_status; > -#define RedfishCS_status_success 0 > +#define RedfishCS_status_success 0 > #define RedfishCS_status_unsupported -1 > #define RedfishCS_status_invalid_parameter -2 > #define RedfishCS_status_insufficient_memory -3 @@ -39,8 +39,8 @@ > typedef RedfishCS_int64 RedfishCS_status; > > typedef struct _RedfishCS_Link RedfishCS_Link; struct _RedfishCS_Link { > - RedfishCS_Link *BackLink; > - RedfishCS_Link *ForwardLink; > + RedfishCS_Link *BackLink; > + RedfishCS_Link *ForwardLink; > }; > > #endif > diff --git a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > index 1429643272..e2f728b26a 100644 > --- a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > +++ b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > @@ -13,26 +13,11 @@ > > #include <Library/RedfishLib.h> > #include <Protocol/EdkIIRedfishPlatformConfig.h> > +#include <Protocol/EdkIIRedfishInterchangeData.h> > #include <RedfishJsonStructure/RedfishCsCommon.h> > > #define REDFISH_ENABLE_SYSTEM_REBOOT() > PcdSetBoolS(PcdRedfishSystemRebootRequired, TRUE) > > -// > -// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG > -// > -typedef struct { > - UINTN Index; > - EFI_STRING ConfigureLang; > -} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG; > - > -// > -// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST > -// > -typedef struct { > - UINTN Count; > - REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG *List; > -} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST; > - > /** > > Read redfish resource by given resource URI. > diff --git > a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > index e8d0462fb7..89708eb8f1 100644 > --- a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > @@ -2,6 +2,7 @@ > This file defines the > EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL interface. > > (C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR> > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -10,7 +11,21 @@ > #ifndef EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_ > #define EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_ > > -#include <Library/RedfishFeatureUtilityLib.h> > +// > +// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG > +// > +typedef struct { > + UINTN Index; > + EFI_STRING ConfigureLang; > +} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG; > + > +// > +// Definition of REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST > +// > +typedef struct { > + UINTN Count; > + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG *List; > +} REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST; > > typedef struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL > EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL; > > @@ -27,15 +42,15 @@ typedef enum { > } RESOURCE_INFORMATION_EXCHANGE_TYPE; > > typedef struct { > - RESOURCE_INFORMATION_EXCHANGE_TYPE Type; > - EFI_STRING ParentUri; ///< The parent URI (in configure language) > of the resource to process. > - EFI_STRING PropertyName; ///< The property name of the resource > to process. > - EFI_STRING FullUri; ///< The full URI (in configure language) of the > resource to process. > + RESOURCE_INFORMATION_EXCHANGE_TYPE Type; > + EFI_STRING ParentUri; ///< The parent URI (in configure > language) of the resource to process. > + EFI_STRING PropertyName; ///< The property name of the > resource to process. > + EFI_STRING FullUri; ///< The full URI (in configure language) > of the resource to process. > } RESOURCE_INFORMATION_SEND; > > typedef struct { > - RESOURCE_INFORMATION_EXCHANGE_TYPE Type; > - REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST > ConfigureLanguageList; > + RESOURCE_INFORMATION_EXCHANGE_TYPE Type; > + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST > ConfigureLanguageList; > } RESOURCE_INFORMATION_RETURNED; > > typedef struct { > @@ -44,9 +59,9 @@ typedef struct { > } RESOURCE_INFORMATION_EXCHANGE; > > struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL { > - RESOURCE_INFORMATION_EXCHANGE *ResourceInformationExchage; > + RESOURCE_INFORMATION_EXCHANGE *ResourceInformationExchage; > }; > > -extern EFI_GUID gEdkIIRedfishFeatureInterchangeDataProtocolGuid; > +extern EFI_GUID gEdkIIRedfishFeatureInterchangeDataProtocolGuid; > > #endif > -- > 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101376): https://edk2.groups.io/g/devel/message/101376 Mute This Topic: https://groups.io/mt/97644705/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2023 Red Hat, Inc.