remove IPMI_CC_OK
Since IPMI_CC_OK declared in api.h has been gradually deprecated,
this submission will use ipmi::ccSuccess in api.hpp instead.
Change-Id: Iabc1e7172b5872a5fc94dad16cb3fcf71ca6cb3c
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/dbus-sdr/sensorcommands.cpp b/dbus-sdr/sensorcommands.cpp
index 2ef33b9..816c9b2 100644
--- a/dbus-sdr/sensorcommands.cpp
+++ b/dbus-sdr/sensorcommands.cpp
@@ -691,7 +691,7 @@
// handle fru records
get_sdr::SensorDataFruRecord data;
if (ipmi::Cc ret = ipmi::storage::getFruSdrs(ctx, sdrIndex, data);
- ret != IPMI_CC_OK)
+ ret != ipmi::ccSuccess)
{
return GENERAL_ERROR;
}
diff --git a/dbus-sdr/storagecommands.cpp b/dbus-sdr/storagecommands.cpp
index bb0052f..74ac3dd 100644
--- a/dbus-sdr/storagecommands.cpp
+++ b/dbus-sdr/storagecommands.cpp
@@ -541,7 +541,7 @@
ipmi_ret_t getFruSdrCount(ipmi::Context::ptr, size_t& count)
{
count = deviceHashes.size();
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
ipmi_ret_t getFruSdrs([[maybe_unused]] ipmi::Context::ptr ctx, size_t index,
@@ -731,7 +731,7 @@
resp.body.deviceIDLen = ipmi::storage::typeASCIILatin8 | name.size();
name.copy(resp.body.deviceID, name.size());
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
static bool getSELLogFiles(std::vector<std::filesystem::path>& selLogFiles)
diff --git a/groupext.cpp b/groupext.cpp
index 9578b83..a3a806e 100644
--- a/groupext.cpp
+++ b/groupext.cpp
@@ -10,7 +10,7 @@
ipmi_context_t)
{
// Generic return from IPMI commands.
- ipmi_ret_t rc = IPMI_CC_OK;
+ ipmi_ret_t rc = ipmi::ccSuccess;
uint8_t* p = (uint8_t*)response;
std::printf("IPMI GROUP EXTENSIONS\n");
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 3505dfb..2485071 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -44,7 +44,7 @@
commit<InternalFailure>();
return IPMI_CC_UNSPECIFIED_ERROR;
}
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
namespace get
@@ -267,7 +267,7 @@
}
}
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
} // namespace set
@@ -323,7 +323,7 @@
// Skip update if skipOn is ASSERT
if (SkipAssertion::ASSERT == value.second.skip)
{
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
result = result && std::get<bool>(value.second.assert);
valid = true;
@@ -333,7 +333,7 @@
// Skip update if skipOn is DEASSERT
if (SkipAssertion::DEASSERT == value.second.skip)
{
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
result = result && std::get<bool>(value.second.deassert);
valid = true;
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index e48d0ea..eb45900 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -1160,7 +1160,7 @@
strncpy(body->id_string, id_string.c_str(),
get_sdr::body::get_id_strlen(body));
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
};
ipmi_ret_t ipmi_fru_get_sdr(ipmi_request_t request, ipmi_response_t response,
@@ -1251,7 +1251,7 @@
*data_len = dataLength;
*data_len += 2; // additional 2 bytes for next record ID
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
ipmi_ret_t ipmi_entity_get_sdr(ipmi_request_t request, ipmi_response_t response,
@@ -1324,14 +1324,14 @@
*data_len = dataLength;
*data_len += 2; // additional 2 bytes for next record ID
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
ipmi_ret_t ipmi_sen_get_sdr(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t request,
ipmi_response_t response, ipmi_data_len_t data_len,
ipmi_context_t)
{
- ipmi_ret_t ret = IPMI_CC_OK;
+ ipmi_ret_t ret = ipmi::ccSuccess;
get_sdr::GetSdrReq* req = (get_sdr::GetSdrReq*)request;
get_sdr::GetSdrResp* resp = (get_sdr::GetSdrResp*)response;
@@ -1523,7 +1523,7 @@
lg2::error("exception message: {ERROR}", "ERROR", e);
return IPMI_CC_UNSPECIFIED_ERROR;
}
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
void registerNetFnSenFunctions()
diff --git a/storagehandler.cpp b/storagehandler.cpp
index ef5630c..a62f8f9 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -386,7 +386,7 @@
*data_len = sizeof(nextRecordID) + readLength;
}
- return IPMI_CC_OK;
+ return ipmi::ccSuccess;
}
/** @brief implements the delete SEL entry command