Star:
  The patch is good to me. 
  Reviewed-by: Chao Zhang <chao.b.zh...@intel.com>





Thanks & Best regards
Chao Zhang


-----Original Message-----
From: Zeng, Star 
Sent: Monday, December 28, 2015 2:53 PM
To: edk2-devel@lists.01.org
Cc: Zhang, Chao B
Subject: [PATCH] SecurityPkg AuthVariableLib: Correct comment/error log about 
CleanCertsFromDb

Cc: Chao Zhang <chao.b.zh...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.z...@intel.com>
---
 SecurityPkg/Library/AuthVariableLib/AuthService.c     | 16 +++++++---------
 SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c |  2 +-
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c 
b/SecurityPkg/Library/AuthVariableLib/AuthService.c
index 9a09eae..1c5c2f3 100644
--- a/SecurityPkg/Library/AuthVariableLib/AuthService.c
+++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c
@@ -2984,12 +2984,13 @@ InsertCertsToDb (
 /**
   Clean up signer's certificates for common authenticated variable
   by corresponding VariableName and VendorGuid from "certdb".
-  Sytem may break down during Timebased Variable update & certdb update,
-  make them inconsistent,  this function is called in AuthVariable Init to 
ensure
-  consistency
-  
-  @retval  EFI_NOT_FOUND         Fail to find matching certs.
-  @retval  EFI_SUCCESS           Find matching certs and output parameters.
+  System may break down during Timebased Variable update & certdb 
+ update,  make them inconsistent,  this function is called in 
+ AuthVariable Init  to ensure consistency.
+
+  @retval  EFI_NOT_FOUND         Fail to find variable "certdb".
+  @retval  EFI_OUT_OF_RESOURCES  The operation is failed due to lack of 
resources.
+  @retval  EFI_SUCCESS           The operation is completed successfully.
 
 **/
 EFI_STATUS
@@ -3040,9 +3041,6 @@ CleanCertsFromDb (
 
     while (Offset < (UINT32) DataSize) {
       Ptr = (AUTH_CERT_DB_DATA *) (Data + Offset);
-      //
-      // Check whether VendorGuid matches.
-      //
       NodeSize = ReadUnaligned32 (&Ptr->CertNodeSize);
       NameSize = ReadUnaligned32 (&Ptr->NameSize);
 
diff --git a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c 
b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
index dee5e1d..bf60bf5 100644
--- a/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
+++ b/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
@@ -283,7 +283,7 @@ AuthVariableLibInitialize (
     //
     Status = CleanCertsFromDb();
     if (EFI_ERROR (Status)) {
-      DEBUG ((EFI_D_INFO, "Clean up CertDB fail! Status %x\n", Status));
+      DEBUG ((EFI_D_ERROR, "Clean up CertDB fail! Status %x\n", 
+ Status));
       return Status;
     }
   }
--
1.9.5.msysgit.0

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

Reply via email to