Skip to content

Commit 4a24839

Browse files
committed
Update copyright on the auto-generated source files and add debug message
1 parent 4ae5f91 commit 4a24839

File tree

5 files changed

+60
-40
lines changed

5 files changed

+60
-40
lines changed

GenCRelatedFile.py

+14-12
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@
4040
from RedfishCSDef import LOGFOR_CSTRUCTURE_TO_JSON_RESOURCETYPE
4141
from RedfishCSDef import LOGFOR_CSTRUCTURE_TO_JSON_VERSION
4242

43-
HPECopyright = "//\n" \
44-
"// Auto-generated file by Redfish Schema C Structure Generator.\n" + \
45-
"// https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
46-
"//\n" + \
47-
"// (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>\n" + \
48-
"//\n" + \
49-
"// Copyright Notice:\n" + \
50-
"// Copyright 2019-2022 Distributed Management Task Force, Inc. All rights reserved.\n" + \
51-
"// License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md\n" +\
52-
"//\n"
43+
ContributorCopyright = "//\n" \
44+
"// Auto-generated file by Redfish Schema C Structure Generator.\n" + \
45+
"// https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
46+
"//\n" + \
47+
"// (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>\n" + \
48+
"// Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n" + \
49+
"// Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>\n" + \
50+
"//\n" + \
51+
"// Copyright Notice:\n" + \
52+
"// Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.\n" + \
53+
"// License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md\n" +\
54+
"//\n"
5355

5456
CCodeErrorExitCode = C_SRC_TAB_SPACE + "if (Status != RedfishCS_status_success) {\n" +\
5557
C_SRC_TAB_SPACE * 2 + "goto Error;\n" +\
@@ -1195,7 +1197,7 @@ def GenCSIncludefile (self):
11951197
StructureName = self.StructureName
11961198
StructureMemberDataType = self.StructureMemberDataType
11971199

1198-
self.RedfishSchemaFile.CIncludeFileText = HPECopyright + "\n"
1200+
self.RedfishSchemaFile.CIncludeFileText = ContributorCopyright + "\n"
11991201
self.RedfishSchemaFile.CIncludeFileText += ("#ifndef " + REDFISH_STRUCT_NAME_HEAD + \
12001202
RedfishCs.ResourceType.capitalize() + \
12011203
"_" + RedfishCs.SchemaVersion.capitalize() + \
@@ -1498,7 +1500,7 @@ def GenCSCfile (self):
14981500
except BreakForLoop:
14991501
pass
15001502

1501-
self.CTextFile = HPECopyright + "\n"
1503+
self.CTextFile = ContributorCopyright + "\n"
15021504
self.CTextFile += ("#include" + "\"" + self.CIncludeFileName + "\"\n")
15031505
self.CTextFile += ("#include <stdlib.h>\n")
15041506
self.CTextFile += ("#include <string.h>\n")

GenEdk2Files.py

+22-18
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,39 @@
2424
from RedfishCSDef import TAB_SPACE
2525
from RedfishCSDef import MEMBER_DESCRIPTION_CHARS
2626

27-
HPECopyright = "//\n" \
28-
"// Auto-generated file by Redfish Schema C Structure Generator.\n" + \
29-
"// https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
30-
"//\n" + \
31-
"// (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>\n" + \
32-
"// SPDX-License-Identifier: BSD-2-Clause-Patent\n" + \
33-
"//\n" + \
34-
"// Auto-generated file by Redfish Schema C Structure Generator.\n" + \
35-
"// https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
36-
"// Copyright Notice:\n" + \
37-
"// Copyright 2019-2022 Distributed Management Task Force, Inc. All rights reserved.\n" + \
38-
"// License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md\n" + \
39-
"//\n"
27+
ContributorCopyright = "//\n" \
28+
"// Auto-generated file by Redfish Schema C Structure Generator.\n" + \
29+
"// https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
30+
"//\n" + \
31+
"// (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>\n" + \
32+
"// Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n" + \
33+
"// Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>\n" + \
34+
"// SPDX-License-Identifier: BSD-2-Clause-Patent\n" + \
35+
"//\n" + \
36+
"// Auto-generated file by Redfish Schema C Structure Generator.\n" + \
37+
"// https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
38+
"// Copyright Notice:\n" + \
39+
"// Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.\n" + \
40+
"// License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md\n" + \
41+
"//\n"
4042

4143
DMTFCopyright = "//----------------------------------------------------------------------------\n" + \
4244
"// Copyright Notice:\n" \
43-
"// Copyright 2019-2021 Distributed Management Task Force, Inc. All rights reserved.\n" + \
44-
"// License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md\n" + \
45+
"// Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.\n" + \
46+
"// License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md\n" + \
4547
"//----------------------------------------------------------------------------\n"
4648

4749
Edk2InfFileCopyright = "#\n" + \
4850
"# (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>\n" + \
51+
"# Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n" + \
52+
"# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>\n" + \
4953
"# SPDX-License-Identifier: BSD-2-Clause-Patent\n" + \
5054
"#\n" + \
5155
"# Auto-generated file by Redfish Schema C Structure Generator.\n" + \
5256
"# https://github.com/DMTF/Redfish-Schema-C-Struct-Generator.\n" + \
5357
"# Copyright Notice:\n" + \
54-
"# Copyright 2019-2022 Distributed Management Task Force, Inc. All rights reserved.\n" + \
55-
"# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md\n" + \
58+
"# Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.\n" + \
59+
"# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/master/LICENSE.md\n" + \
5660
"#\n"
5761

5862
Edk2InfFileTemp = "[Defines]\n" + \
@@ -135,7 +139,7 @@ def GenEdk2IncludeFile(self):
135139
SchemaVersion = "_" + RedfishCs.SchemaVersion.upper()
136140
PrefixForwardDir = "../"
137141

138-
self.RedfishSchemaFile.Edk2IncludeFileText = HPECopyright + "\n"
142+
self.RedfishSchemaFile.Edk2IncludeFileText = ContributorCopyright + "\n"
139143
self.RedfishSchemaFile.Edk2IncludeFileText += ("#ifndef " + "EFI_" + REDFISH_STRUCT_NAME_HEAD.upper() + \
140144
RedfishCs.ResourceType.upper() + \
141145
SchemaVersion + \

_Edk2OpenSourceTempFiles/RedfishCsDxe.temp

+18-8
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
- !**RESOURCE_TYPE**!.!**SCHEMA_VERSION**!
55

66
(C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>
7+
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
8+
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
79
SPDX-License-Identifier: BSD-2-Clause-Patent
810

911
Auto-generated file by Redfish Schema C Structure Generator.
1012
https://github.com/DMTF/Redfish-Schema-C-Struct-Generator
1113

1214
Copyright Notice:
13-
Copyright 2019-2022 Distributed Management Task Force, Inc. All rights reserved.
15+
Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.
1416
License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md d
1517

1618
**/
1719
#include <Uefi.h>
1820
#include <Library/BaseLib.h>
21+
#include <Library/DebugLib.h>
1922
#include <Library/UefiBootServicesTableLib.h>
2023
#include <Library/UefiDriverEntryPoint.h>
2124
#include <Library/UefiRuntimeServicesTableLib.h>
@@ -32,7 +35,7 @@
3235
CHAR8 mResourceTypeStr [] = "#!**RESOURCE_TYPE**!";
3336
BOOLEAN IsRevisonController = !**IS_VERSION_CONTROLLED_BOOLEAN**!;
3437

35-
// Support !**RESOURCE_TYPE**! !**SCHEMA_VERSION_CAPITAL**!
38+
// Support !**RESOURCE_TYPE**! !**SCHEMA_VERSION_CAPITAL**!
3639
EFI_REST_JSON_STRUCTURE_SUPPORTED ResourceInterP [] = {
3740
{
3841
{
@@ -54,11 +57,11 @@ EFI_REST_JSON_STRUCTURE_PROTOCOL *mRestJsonStructureProt = NULL;
5457

5558
/**
5659
This function gets the string of revision number.
57-
60+
5861
@param[in] Str Odata.type string.
59-
@param[in] StrIndex Current string index.
62+
@param[in] StrIndex Current string index.
6063
@param[in] OdataTypeStrLen Odata.type string length
61-
64+
6265
@retval != 0 Number found.
6366
@retval 0 Number not found.
6467

@@ -298,8 +301,8 @@ EFIAPI
298301

299302
@param[in] This EFI_REST_JSON_STRUCTURE_PROTOCOL instance.
300303
@param[in] InterpProp Given Restful resource.
301-
@param[out] ResoruceRaw Resource in RESTfuls service oriented property interpreted from given ResoruceRaw.
302-
Caller has to release the memory allocated for ResoruceRaw using DestoryJson function.
304+
@param[out] ResoruceRaw Resource in RESTful service oriented property interpreted from given ResoruceRaw.
305+
Caller has to release the memory allocated for ResoruceRaw using DestroyJson function.
303306

304307
@retval EFI_SUCCESS
305308
@retval Others
@@ -313,10 +316,17 @@ EFIAPI
313316
OUT CHAR8 **ResoruceRaw
314317
)
315318
{
319+
EFI_STATUS RedfishStatus;
320+
316321
if (InterpProp == NULL || ResoruceRaw == NULL) {
317322
return EFI_INVALID_PARAMETER;
318323
}
319-
return (EFI_STATUS)!**EDK2_REDFISH_CS_TO_JSON_FUNC_NAME**! (*((!**EDK2_REDFISH_CS_NAME**! **)((UINT8 *)InterpProp + sizeof (EFI_REST_JSON_STRUCTURE_HEADER))), ResoruceRaw);
324+
DEBUG((DEBUG_MANAGEABILITY, "%a: Call to !**EDK2_REDFISH_CS_TO_JSON_FUNC_NAME**!\n", __func__));
325+
RedfishStatus = (EFI_STATUS)!**EDK2_REDFISH_CS_TO_JSON_FUNC_NAME**! (*((!**EDK2_REDFISH_CS_NAME**! **)((UINT8 *)InterpProp + sizeof (EFI_REST_JSON_STRUCTURE_HEADER))), ResoruceRaw);
326+
if (EFI_ERROR(RedfishStatus)) {
327+
DEBUG((DEBUG_MANAGEABILITY, "%a Call to !**EDK2_REDFISH_CS_TO_JSON_FUNC_NAME**! fail (%d)\n", __func__, RedfishStatus));
328+
}
329+
return RedfishStatus;
320330
}
321331

322332
/**

_Edk2OpenSourceTempFiles/RedfishCsInclude.temp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
This file defines the EFI Redfish C Structure Interpreter for !**RESOURCE_TYPE**! !**SCHEMA_VERSION**!
33

44
(C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>
5+
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
6+
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
57
SPDX-License-Identifier: BSD-2-Clause-Patent
68

79
Auto-generated file by Redfish Schema C Structure Generator.
810
https://github.com/DMTF/Redfish-Schema-C-Struct-Generator
911

1012
Copyright Notice:
11-
Copyright 2019-2022 Distributed Management Task Force, Inc. All rights reserved.
13+
Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.
1214
License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md
1315

1416
**/

_Edk2OpenSourceTempFiles/RedfishCsInf.temp

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
# INF file of !**RESOURCE_TYPE**!.!**SCHEMA_VERSION**! EFI Redfish JSON Structure DXE driver
44
#
55
# (C) Copyright 2019-2022 Hewlett Packard Enterprise Development LP<BR>
6+
# Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
7+
# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.<BR>
68
# SPDX-License-Identifier: BSD-2-Clause-Patent
79
#
810
# Auto-generated file by Redfish Schema C Structure Generator.
911
# https://github.com/DMTF/Redfish-Schema-C-Struct-Generator
1012
#
1113
# Copyright Notice:
12-
# Copyright 2019-2022 Distributed Management Task Force, Inc. All rights reserved.
14+
# Copyright 2019-2024 Distributed Management Task Force, Inc. All rights reserved.
1315
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/Redfish-JSON-C-Struct-Converter/blob/main/LICENSE.md
1416
#
1517
##

0 commit comments

Comments
 (0)