summaryrefslogtreecommitdiffstats
path: root/readeeprom.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-17 13:05:03 -0700
committerPatrick Venture <venture@google.com>2018-10-17 13:05:51 -0700
commit52f1f1892e9097aaebb4c1b3ca7fc76cf5126bb6 (patch)
treebc0a2d69f85512f8456fd78aba3bc64f3b3eb3ba /readeeprom.cpp
parent5739ac3b37ffa3fc32664afdd5aa9ef8f5cf2aa0 (diff)
downloadipmi-fru-parser-52f1f1892e9097aaebb4c1b3ca7fc76cf5126bb6.tar.gz
ipmi-fru-parser-52f1f1892e9097aaebb4c1b3ca7fc76cf5126bb6.zip
readeeprom: c-library cleanup
Include cpp libraries for c-library calls. Change-Id: Id082853977b2d0e3dde2bafa5a9eafe5252d9e0f Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'readeeprom.cpp')
-rw-r--r--readeeprom.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/readeeprom.cpp b/readeeprom.cpp
index b8b2fd8..2f0e666 100644
--- a/readeeprom.cpp
+++ b/readeeprom.cpp
@@ -1,6 +1,8 @@
#include "argument.hpp"
#include "writefrudata.hpp"
+#include <cstdlib>
+#include <cstring>
#include <iostream>
#include <memory>
@@ -42,7 +44,7 @@ int main(int argc, char** argv)
}
// Extract the fruid
- fruid = strtol(fruid_str.c_str(), NULL, 16);
+ fruid = std::strtol(fruid_str.c_str(), NULL, 16);
if (fruid == 0)
{
// User has not passed in the appropriate argument value
@@ -56,7 +58,8 @@ int main(int argc, char** argv)
rc = sd_bus_open_system(&bus_type);
if (rc < 0)
{
- fprintf(stderr, "Failed to connect to system bus: %s\n", strerror(-rc));
+ std::fprintf(stderr, "Failed to connect to system bus: %s\n",
+ std::strerror(-rc));
}
else
{
OpenPOWER on IntegriCloud