summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-20 19:36:01 -0700
committerPatrick Venture <venture@google.com>2018-10-20 19:37:54 -0700
commit9eb82cf42151bfee404abd3e61240461e7d1e39b (patch)
tree915e3fa432996406854c6e0989b4ea999829a1a8
parentd9af7b4458b042d0100ef964b6f7b5dd4d6f5569 (diff)
downloadipmi-fru-parser-9eb82cf42151bfee404abd3e61240461e7d1e39b.zip
ipmi-fru-parser-9eb82cf42151bfee404abd3e61240461e7d1e39b.tar.gz
ipmi_fru: Rename to IPMIFruArea
Rename ipmi_fru to IPMIFruArea FRU is an acronym for Field Replaceable Unit, but is consistently Fru in this codebase. Change-Id: I53f82b51bbf01416c8a666082612cd70945cc9a5 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--fru-area.hpp14
-rw-r--r--writefrudata.cpp16
2 files changed, 15 insertions, 15 deletions
diff --git a/fru-area.hpp b/fru-area.hpp
index fce830d..2595e54 100644
--- a/fru-area.hpp
+++ b/fru-area.hpp
@@ -12,10 +12,10 @@
#include <string>
#include <vector>
-class ipmi_fru;
-typedef std::vector<std::unique_ptr<ipmi_fru>> fru_area_vec_t;
+class IPMIFruArea;
+typedef std::vector<std::unique_ptr<IPMIFruArea>> fru_area_vec_t;
-class ipmi_fru
+class IPMIFruArea
{
private:
// Unique way of identifying a FRU
@@ -52,15 +52,15 @@ class ipmi_fru
std::string iv_intf_name;
// Default constructor disabled.
- ipmi_fru();
+ IPMIFruArea();
public:
// constructor
- ipmi_fru(const uint8_t fruid, const ipmi_fru_area_type type,
- bool bmc_fru = false);
+ IPMIFruArea(const uint8_t fruid, const ipmi_fru_area_type type,
+ bool bmc_fru = false);
// Destructor
- virtual ~ipmi_fru();
+ virtual ~IPMIFruArea();
// If a particular area has been marked valid / invalid
inline bool is_valid() const
diff --git a/writefrudata.cpp b/writefrudata.cpp
index 41c1402..ffe53c0 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -277,8 +277,8 @@ int updateInventory(fru_area_vec_t& area_vec, sd_bus* bus_sd)
//----------------------------------------------------------------
// Constructor
//----------------------------------------------------------------
-ipmi_fru::ipmi_fru(const uint8_t fruid, const ipmi_fru_area_type type,
- bool bmc_fru)
+IPMIFruArea::IPMIFruArea(const uint8_t fruid, const ipmi_fru_area_type type,
+ bool bmc_fru)
{
iv_fruid = fruid;
iv_type = type;
@@ -318,7 +318,7 @@ ipmi_fru::ipmi_fru(const uint8_t fruid, const ipmi_fru_area_type type,
// For a FRU area type, accepts the data and updates
// area specific data.
//-----------------------------------------------------
-void ipmi_fru::set_data(const uint8_t* data, const size_t len)
+void IPMIFruArea::set_data(const uint8_t* data, const size_t len)
{
iv_len = len;
iv_data = new uint8_t[len];
@@ -328,8 +328,8 @@ void ipmi_fru::set_data(const uint8_t* data, const size_t len)
//-----------------------------------------------------
// Sets the dbus parameters
//-----------------------------------------------------
-void ipmi_fru::update_dbus_paths(const char* bus_name, const char* obj_path,
- const char* intf_name)
+void IPMIFruArea::update_dbus_paths(const char* bus_name, const char* obj_path,
+ const char* intf_name)
{
iv_bus_name = bus_name;
iv_obj_path = obj_path;
@@ -339,7 +339,7 @@ void ipmi_fru::update_dbus_paths(const char* bus_name, const char* obj_path,
//-------------------
// Destructor
//-------------------
-ipmi_fru::~ipmi_fru()
+IPMIFruArea::~IPMIFruArea()
{
if (iv_data != NULL)
{
@@ -451,7 +451,7 @@ int verify_fru_data(const uint8_t* data, const size_t len)
///----------------------------------------------------
// Checks if a particular fru area is populated or not
///----------------------------------------------------
-bool remove_invalid_area(const std::unique_ptr<ipmi_fru>& fru_area)
+bool remove_invalid_area(const std::unique_ptr<IPMIFruArea>& fru_area)
{
// Filter the ones that are empty
if (!(fru_area->get_len()))
@@ -600,7 +600,7 @@ int validateFRUArea(const uint8_t fruid, const char* fru_file_name,
fru_entry < (sizeof(struct common_header) - 2); fru_entry++)
{
// Create an object and push onto a vector.
- std::unique_ptr<ipmi_fru> fru_area = std::make_unique<ipmi_fru>(
+ std::unique_ptr<IPMIFruArea> fru_area = std::make_unique<IPMIFruArea>(
fruid, get_fru_area_type(fru_entry), bmc_fru);
// Physically being present
OpenPOWER on IntegriCloud