summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Reynolds <jrey@us.ibm.com>2018-05-30 10:29:20 -0500
committerJoseph Reynolds <jrey@us.ibm.com>2018-05-30 10:36:05 -0500
commit13ae5003b6179b4fee533fefa974bea531db8a71 (patch)
tree0ad5d3fed285674b727a1fb763900c9a221b7951
parentb5508d7a0fd9202c37cc02aea045f189e991dd09 (diff)
downloadopenpower-occ-control-13ae5003b6179b4fee533fefa974bea531db8a71.zip
openpower-occ-control-13ae5003b6179b4fee533fefa974bea531db8a71.tar.gz
Use s.c_str() in log messages
Partly resolves openbmc/openbmc 2905 Also, fixed related problem with parenthesis in occ_presence.cpp. Tested: static_assert only Change-Id: Ib0dbf9c895e9f636ddc873221fd1ef93980c0353 Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
-rw-r--r--occ_presence.cpp4
-rw-r--r--powercap.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/occ_presence.cpp b/occ_presence.cpp
index 23fece0..59b886a 100644
--- a/occ_presence.cpp
+++ b/occ_presence.cpp
@@ -44,8 +44,8 @@ void Presence::analyzeEvent()
if (manager.getNumOCCs() != occsPresent)
{
log<level::INFO>("OCC presence mismatch",
- entry("BMC_OCCS=%d", manager.getNumOCCs(),
- entry("OCC_OCCS=%d", occsPresent)));
+ entry("BMC_OCCS=%d", manager.getNumOCCs()),
+ entry("OCC_OCCS=%d", occsPresent));
if (callBack)
{
callBack(true);
diff --git a/powercap.cpp b/powercap.cpp
index f2ae331..4c0c330 100644
--- a/powercap.cpp
+++ b/powercap.cpp
@@ -132,7 +132,7 @@ void PowerCap::writeOcc(uint32_t pcapValue)
auto pcapString {std::to_string(pcapValue)};
log<level::INFO>("Writing pcap value to hwmon",
- entry("PCAP_PATH=%s",*fileName),
+ entry("PCAP_PATH=%s",fileName->c_str()),
entry("PCAP_VALUE=%s",pcapString.c_str()));
// Open the hwmon file and write the power cap
std::ofstream file(*fileName, std::ios::out);
OpenPOWER on IntegriCloud