public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-redfish-client][PATCH 1/4] RedfishClientPkg: Update ETag driver
@ 2023-05-10  8:23 Nickle Wang
  2023-05-10  8:25 ` Chang, Abner
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-05-10  8:23 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy

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

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 RedfishClientPkg/RedfishClientPkg.dec            |  2 +-
 RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h |  4 ++--
 RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec
index 7bdab5be..67929341 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.h b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h
index 6dffa9d7..3542f289 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
 
 //
diff --git a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
index af920afc..a4233a64 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
 
@@ -401,16 +401,16 @@ 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);
 }
 
 /**
@@ -446,7 +446,7 @@ InitialETagList (
   //
   Status = GetVariable2 (
              VariableName,
-             &gEfiCallerIdGuid,
+             &mRedfishVariableGuid,
              (VOID *)&VarData,
              &VariableSize
              );
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-redfish-client][PATCH 1/4] RedfishClientPkg: Update ETag driver
  2023-05-10  8:23 [edk2-redfish-client][PATCH 1/4] RedfishClientPkg: Update ETag driver Nickle Wang
@ 2023-05-10  8:25 ` Chang, Abner
  0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-05-10  8:25 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Wednesday, May 10, 2023 4:24 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [edk2-redfish-client][PATCH 1/4] RedfishClientPkg: Update ETag
> driver
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Update ETag driver and use specific variable GUID. Also fix the typo in
> comment.
> 
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  RedfishClientPkg/RedfishClientPkg.dec            |  2 +-
>  RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h |  4 ++--
> RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 10 +++++-----
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/RedfishClientPkg/RedfishClientPkg.dec
> b/RedfishClientPkg/RedfishClientPkg.dec
> index 7bdab5be..67929341 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.h
> b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.h
> index 6dffa9d7..3542f289 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
> 
>  //
> diff --git a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
> b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c
> index af920afc..a4233a64 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
> 
> @@ -401,16 +401,16 @@ 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);
>  }
> 
>  /**
> @@ -446,7 +446,7 @@ InitialETagList (
>    //
>    Status = GetVariable2 (
>               VariableName,
> -             &gEfiCallerIdGuid,
> +             &mRedfishVariableGuid,
>               (VOID *)&VarData,
>               &VariableSize
>               );
> --
> 2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-10  8:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10  8:23 [edk2-redfish-client][PATCH 1/4] RedfishClientPkg: Update ETag driver Nickle Wang
2023-05-10  8:25 ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox