[edk2-staging][PATCH v2 07/15] edk2-staging/RedfishClientPkg: Update ETag driver


Nickle Wang
 

Update ETag driver and use specific variable GUID. Also fix the typo
in comment.

Signed-off-by: Nickle Wang <nickle.wang@...>
Cc: Abner Chang <abner.chang@...>
Cc: Yang Atom <Atom.Yang@...>
Cc: Nick Ramirez <nramirez@...>
---
RedfishClientPkg/RedfishClientPkg.dec | 2 +-
RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 10 +++++-----
RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
index 7bdab5be0c..67929341df 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -36,7 +36,7 @@
gEdkIIRedfishFeatureProtocolGuid = { 0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } }
## Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
gEdkIIRedfishResourceConfigProtocolGuid = { 0x6f164c68, 0xfb09, 0x4646, { 0xa8, 0xd3, 0x24, 0x11, 0x5d, 0xab, 0x3e, 0xe7 } }
- ## Include/Protocol/EdkiiRedfishETagProtocol.h
+ ## Include/Protocol/EdkIIRedfishETagProtocol.h
gEdkIIRedfishETagProtocolGuid = { 0x5706d368, 0xaf66, 0x48f5, { 0x89, 0xfc, 0xa6, 0x61, 0xce, 0xb5, 0xa6, 0xa9 } }
## Include/Protocol/EdkIIRedfishConfigLangMapProtocol.h
gEdkIIRedfishConfigLangMapProtocolGuid = { 0x1d9ba9fe, 0x5d5a, 0x4b66, {0x83, 0x5b, 0xe2, 0x5d, 0x13, 0x93, 0x4a, 0x9c } }
diff --git a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
index 73d3a8c39a..52015672f9 100644
--- a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
+++ b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
@@ -1,6 +1,6 @@
/** @file

- (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+ (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>

SPDX-License-Identifier: BSD-2-Clause-Patent

@@ -398,17 +398,17 @@ SaveETagList (
//
Status = GetVariable2 (
VariableName,
- &gEfiCallerIdGuid,
+ &mRedfishVariableGuid,
(VOID *)&Data,
NULL
);
if (!EFI_ERROR (Status)) {
FreePool (Data);
- gRT->SetVariable (VariableName, &gEfiCallerIdGuid, VARIABLE_ATTRIBUTE_NV_BS, 0, NULL);
+ gRT->SetVariable (VariableName, &mRedfishVariableGuid, VARIABLE_ATTRIBUTE_NV_BS, 0, NULL);
}


- return gRT->SetVariable (VariableName, &gEfiCallerIdGuid, VARIABLE_ATTRIBUTE_NV_BS, VarSize, (VOID *)VarData);
+ return gRT->SetVariable (VariableName, &mRedfishVariableGuid, VARIABLE_ATTRIBUTE_NV_BS, VarSize, (VOID *)VarData);
}

/**
@@ -444,7 +444,7 @@ InitialETagList (
//
Status = GetVariable2 (
VariableName,
- &gEfiCallerIdGuid,
+ &mRedfishVariableGuid,
(VOID *)&VarData,
&VariableSize
);
diff --git a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h
index 58925b4a51..3deab377dc 100644
--- a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h
+++ b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h
@@ -1,7 +1,7 @@
/** @file
Common header file for RedfishETagDxe driver.

- (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+ (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>

SPDX-License-Identifier: BSD-2-Clause-Patent

@@ -11,6 +11,7 @@
#define REDFISH_ETAG_DXE_H_

#include <Uefi.h>
+#include <RedfishBase.h>

//
// Libraries
@@ -30,7 +31,6 @@
#include <Guid/VariableFormat.h>

#define ETAG_VARIABLE_NAME L"RedfishETag"
-#define IS_EMPTY_STRING(a) ((a) == NULL || (a)[0] == '\0')
#define ETAG_DEBUG_ENABLED 0x00

//
--
2.32.0.windows.2

Join devel@edk2.groups.io to automatically receive all group messages.