[Skiboot] [PATCH 19/40] libstb/tss/tpmLogMgr: disable TpmLogMgr_dumpLog()

Stewart Smith stewart at linux.vnet.ibm.com
Mon Oct 10 19:44:00 AEDT 2016


From: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>

This disables the TpmLogMgr_dumpLog() function for skiboot.
It breaks the compilation if TRACUCOMP and TRACUBIN macros
are not defined.

Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 libstb/tss/tpmLogMgr.C | 6 ++----
 libstb/tss/tpmLogMgr.H | 3 ++-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/libstb/tss/tpmLogMgr.C b/libstb/tss/tpmLogMgr.C
index 89ab41a..95f4810 100644
--- a/libstb/tss/tpmLogMgr.C
+++ b/libstb/tss/tpmLogMgr.C
@@ -298,6 +298,7 @@ namespace TRUSTEDBOOT
         return val->logSize;
     }
 
+#ifdef __HOSTBOOT_MODULE
     void TpmLogMgr_dumpLog(TpmLogMgr* val)
     {
 
@@ -305,7 +306,6 @@ namespace TRUSTEDBOOT
         TRACUCOMP(g_trac_trustedboot, "tpmDumpLog Size : %d",
                   (int)val->logSize);
 
-#ifdef __HOSTBOOT_MODULE
         // Debug display of raw data
         if (NULL == val->eventLogInMem)
         {
@@ -314,13 +314,11 @@ namespace TRUSTEDBOOT
         }
         else
         {
-#endif
             TRACUBIN(g_trac_trustedboot, "tpmDumpLog From Memory",
                      val->eventLogInMem, val->logSize);
-#ifdef __HOSTBOOT_MODULE
         }
-#endif
     }
+#endif
 
     uint32_t TpmLogMgr_calcLogSize(TpmLogMgr* val)
     {
diff --git a/libstb/tss/tpmLogMgr.H b/libstb/tss/tpmLogMgr.H
index 5a44b9d..26b8604 100644
--- a/libstb/tss/tpmLogMgr.H
+++ b/libstb/tss/tpmLogMgr.H
@@ -222,12 +222,13 @@ namespace TRUSTEDBOOT
                                                   const uint8_t* i_digest_2,
                                                   size_t i_digestSize_2,
                                                   const char* i_logMsg);
-
+#ifdef __HOSTBOOT_MODULE
     /**
      * @brief Dump contents of log to a trace
      * @param[in] val TpmLogMgr structure
      */
     void TpmLogMgr_dumpLog(TpmLogMgr* val);
+#endif
 
     /**
      * @brief Return a pointer to the start of the log
-- 
2.7.4



More information about the Skiboot mailing list