Patched fixed some small issue for this library:
1. Remove the hard code debug build option in inf.
2. Fixed EBC arch build error in the TcgStorageOpalUtil.c
3. Fixed Gcc build error caused by writing error file name.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.d...@intel.com>
Cc: Feng Tian <feng.t...@intel.com>
---
 SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c  | 2 +-
 SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf | 3 ---
 SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c  | 7 ++++---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c 
b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
index 234909b..2db5ffe 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 
 **/
 
-#include <uefi.h>
+#include <Uefi.h>
 #include <Library/BaseLib.h>
 #include <Library/TimerLib.h>
 #include <Library/BaseMemoryLib.h>
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf 
b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf
index b4589d9..ec26111 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLib.inf
@@ -45,6 +45,3 @@
 
 [Protocols]
   gEfiStorageSecurityCommandProtocolGuid                         ## CONSUMES
-
-[BuildOptions]
-  MSFT:*_*_*_CC_FLAGS = /Od /GL-
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c 
b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c
index 2d3ecb4..d27a9c9 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS 
IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
-#include <uefi.h>
+#include <Uefi.h>
 #include <Library/BaseLib.h>
 #include <Library/DebugLib.h>
 #include <Library/TcgStorageOpalLib.h>
@@ -853,8 +853,9 @@ OpalUtilDetermineOwnership(
   TCG_RESULT       Ret;
   OPAL_OWNER_SHIP  Owner;
 
-  NULL_CHECK(Session);
-  NULL_CHECK(Msid);
+  if ((Session == NULL) || (Msid == NULL)) {
+    return OpalOwnershipUnknown;
+  }
 
   Owner = OpalOwnershipUnknown;
   //
-- 
2.6.4.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to