verifyDriveGeometry.cpp (d3bfa7bb99d0609657a13b8ec410eb4396607e58) verifyDriveGeometry.cpp (82897c35761f505c2b881f72c61f726f7d562692)
1#include "verifyDriveGeometry.hpp"
2
3#include "estoraged_conf.hpp"
4
5#include <phosphor-logging/lg2.hpp>
6#include <xyz/openbmc_project/Common/error.hpp>
7
8#include <string>

--- 8 unchanged lines hidden (view full) ---

17 {
18 lg2::error("Erase verify Geometry too large", "REDFISH_MESSAGE_ID",
19 std::string("OpenBMC.0.1.DriveEraseFailure"),
20 "REDFISH_MESSAGE_ARGS",
21 std::to_string(bytes) + ">" +
22 std::to_string(ERASE_MAX_GEOMETRY));
23 throw InternalFailure();
24 }
1#include "verifyDriveGeometry.hpp"
2
3#include "estoraged_conf.hpp"
4
5#include <phosphor-logging/lg2.hpp>
6#include <xyz/openbmc_project/Common/error.hpp>
7
8#include <string>

--- 8 unchanged lines hidden (view full) ---

17 {
18 lg2::error("Erase verify Geometry too large", "REDFISH_MESSAGE_ID",
19 std::string("OpenBMC.0.1.DriveEraseFailure"),
20 "REDFISH_MESSAGE_ARGS",
21 std::to_string(bytes) + ">" +
22 std::to_string(ERASE_MAX_GEOMETRY));
23 throw InternalFailure();
24 }
25 else if (bytes < ERASE_MIN_GEOMETRY)
25 if (bytes < ERASE_MIN_GEOMETRY)
26 {
27 lg2::error(
28 "eStorageD erase verify Geometry too small", "REDFISH_MESSAGE_ID",
29 std::string("OpenBMC.0.1.DriveEraseFailure"),
30 "REDFISH_MESSAGE_ARGS",
31 std::to_string(bytes) + "<" + std::to_string(ERASE_MIN_GEOMETRY));
32 throw InternalFailure();
33 }
26 {
27 lg2::error(
28 "eStorageD erase verify Geometry too small", "REDFISH_MESSAGE_ID",
29 std::string("OpenBMC.0.1.DriveEraseFailure"),
30 "REDFISH_MESSAGE_ARGS",
31 std::to_string(bytes) + "<" + std::to_string(ERASE_MIN_GEOMETRY));
32 throw InternalFailure();
33 }
34 else
35 {
36 lg2::info("eStorageD erase verify Geometry in range",
37 "REDFISH_MESSAGE_ID",
38 std::string("OpenBMC.0.1.DriveEraseSuccess"));
39 }
34
35 lg2::info("eStorageD erase verify Geometry in range", "REDFISH_MESSAGE_ID",
36 std::string("OpenBMC.0.1.DriveEraseSuccess"));
40}
41
42} // namespace estoraged
37}
38
39} // namespace estoraged