diff options
Diffstat (limited to 'fru_area.cpp')
-rw-r--r-- | fru_area.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/fru_area.cpp b/fru_area.cpp index d70c724..8b09968 100644 --- a/fru_area.cpp +++ b/fru_area.cpp @@ -13,33 +13,33 @@ using namespace phosphor::logging; //---------------------------------------------------------------- IPMIFruArea::IPMIFruArea(const uint8_t fruid, const ipmi_fru_area_type type, bool bmc_fru) : - iv_fruid(fruid), - iv_type(type), iv_bmc_fru(bmc_fru) + fruid(fruid), + type(type), bmc_fru(bmc_fru) { - if (iv_type == IPMI_FRU_AREA_INTERNAL_USE) + if (type == IPMI_FRU_AREA_INTERNAL_USE) { - iv_name = "INTERNAL_"; + name = "INTERNAL_"; } - else if (iv_type == IPMI_FRU_AREA_CHASSIS_INFO) + else if (type == IPMI_FRU_AREA_CHASSIS_INFO) { - iv_name = "CHASSIS_"; + name = "CHASSIS_"; } - else if (iv_type == IPMI_FRU_AREA_BOARD_INFO) + else if (type == IPMI_FRU_AREA_BOARD_INFO) { - iv_name = "BOARD_"; + name = "BOARD_"; } - else if (iv_type == IPMI_FRU_AREA_PRODUCT_INFO) + else if (type == IPMI_FRU_AREA_PRODUCT_INFO) { - iv_name = "PRODUCT_"; + name = "PRODUCT_"; } - else if (iv_type == IPMI_FRU_AREA_MULTI_RECORD) + else if (type == IPMI_FRU_AREA_MULTI_RECORD) { - iv_name = "MULTI_"; + name = "MULTI_"; } else { - iv_name = IPMI_FRU_AREA_TYPE_MAX; - log<level::ERR>("Invalid Area", entry("TYPE=%d", iv_type)); + name = IPMI_FRU_AREA_TYPE_MAX; + log<level::ERR>("Invalid Area", entry("TYPE=%d", type)); } } @@ -47,22 +47,22 @@ IPMIFruArea::IPMIFruArea(const uint8_t fruid, const ipmi_fru_area_type type, // For a FRU area type, accepts the data and updates // area specific data. //----------------------------------------------------- -void IPMIFruArea::set_data(const uint8_t* data, const size_t len) +void IPMIFruArea::set_data(const uint8_t* value, const size_t length) { - iv_len = len; - iv_data = new uint8_t[len]; - std::memcpy(iv_data, data, len); + len = length; + data = new uint8_t[len]; + std::memcpy(data, value, len); } //----------------------------------------------------- // Sets the dbus parameters //----------------------------------------------------- -void IPMIFruArea::update_dbus_paths(const char* bus_name, const char* obj_path, - const char* intf_name) +void IPMIFruArea::update_dbus_paths(const char* bus, const char* path, + const char* intf) { - iv_bus_name = bus_name; - iv_obj_path = obj_path; - iv_intf_name = intf_name; + bus_name = bus; + obj_path = path; + intf_name = intf; } //------------------- @@ -70,9 +70,9 @@ void IPMIFruArea::update_dbus_paths(const char* bus_name, const char* obj_path, //------------------- IPMIFruArea::~IPMIFruArea() { - if (iv_data != NULL) + if (data != NULL) { - delete[] iv_data; - iv_data = NULL; + delete[] data; + data = NULL; } } |