]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDxe/DetectTestKey.c
FmpDevicePkg/FmpDxe: Improve all DEBUG() messages
[mirror_edk2.git] / FmpDevicePkg / FmpDxe / DetectTestKey.c
index e697a0848970f34e1a3163fd3df555aaafb121ad..0e10d5ee17f0d0c147d7755f9ba7a9706d05bfdb 100644 (file)
@@ -1,19 +1,13 @@
 /** @file\r
   Detects if PcdFmpDevicePkcs7CertBufferXdr contains a test key.\r
 \r
-  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
-#include <PiDxe.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BaseCryptLib.h>\r
+#include "FmpDxe.h"\r
 \r
 /**\r
   Check to see if any of the keys in PcdFmpDevicePkcs7CertBufferXdr matches\r
@@ -39,7 +33,7 @@ DetectTestKey (
   UINTN    TestKeyDigestSize;\r
 \r
   //\r
-  // If PcdFmpDeviceTestKeySha256Digest is not exacty SHA256_DIGEST_SIZE bytes,\r
+  // If PcdFmpDeviceTestKeySha256Digest is not exactly SHA256_DIGEST_SIZE bytes,\r
   // then skip the test key detection.\r
   //\r
   TestKeyDigestSize = PcdGetSize (PcdFmpDeviceTestKeySha256Digest);\r
@@ -143,9 +137,9 @@ DetectTestKey (
   // set PcdTestKeyUsed to TRUE.\r
   //\r
   if (TestKeyUsed) {\r
-    DEBUG ((DEBUG_INFO, "FmpDxe: Test key detected in PcdFmpDevicePkcs7CertBufferXdr.\n"));\r
+    DEBUG ((DEBUG_INFO, "FmpDxe(%s): Test key detected in PcdFmpDevicePkcs7CertBufferXdr.\n", mImageIdName));\r
     PcdSetBoolS (PcdTestKeyUsed, TRUE);\r
   } else {\r
-    DEBUG ((DEBUG_INFO, "FmpDxe: No test key detected in PcdFmpDevicePkcs7CertBufferXdr.\n"));\r
+    DEBUG ((DEBUG_INFO, "FmpDxe(%s): No test key detected in PcdFmpDevicePkcs7CertBufferXdr.\n", mImageIdName));\r
   }\r
 }\r