John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 1 | |
| 2 | #include "estoraged.hpp" |
| 3 | |
John Edward Broadbent | 4e13b0a | 2021-11-15 15:21:59 -0800 | [diff] [blame^] | 4 | #include <phosphor-logging/lg2.hpp> |
| 5 | |
John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 6 | #include <iostream> |
| 7 | #include <vector> |
| 8 | |
| 9 | namespace estoraged |
| 10 | { |
| 11 | |
| 12 | void eStoraged::format(std::vector<uint8_t>) |
| 13 | { |
| 14 | std::cerr << "Formatting encrypted eMMC" << std::endl; |
John Edward Broadbent | 4e13b0a | 2021-11-15 15:21:59 -0800 | [diff] [blame^] | 15 | std::string msg = "OpenBMC.0.1.DriveFormat"; |
| 16 | lg2::info("Starting format", "REDFISH_MESSAGE_ID", msg); |
John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | void eStoraged::erase(std::vector<uint8_t>, EraseMethod) |
| 20 | { |
| 21 | std::cerr << "Erasing encrypted eMMC" << std::endl; |
John Edward Broadbent | 4e13b0a | 2021-11-15 15:21:59 -0800 | [diff] [blame^] | 22 | std::string msg = "OpenBMC.0.1.DriveErase"; |
| 23 | lg2::info("Starting erase", "REDFISH_MESSAGE_ID", msg); |
John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | void eStoraged::lock(std::vector<uint8_t>) |
| 27 | { |
| 28 | std::cerr << "Locking encrypted eMMC" << std::endl; |
John Edward Broadbent | 4e13b0a | 2021-11-15 15:21:59 -0800 | [diff] [blame^] | 29 | std::string msg = "OpenBMC.0.1.DriveLock"; |
| 30 | lg2::info("Starting lock", "REDFISH_MESSAGE_ID", msg); |
John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | void eStoraged::unlock(std::vector<uint8_t>) |
| 34 | { |
| 35 | std::cerr << "Unlocking encrypted eMMC" << std::endl; |
John Edward Broadbent | 4e13b0a | 2021-11-15 15:21:59 -0800 | [diff] [blame^] | 36 | std::string msg = "OpenBMC.0.1.DriveUnlock"; |
| 37 | lg2::info("Starting unlock", "REDFISH_MESSAGE_ID", msg); |
John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | void eStoraged::changePassword(std::vector<uint8_t>, std::vector<uint8_t>) |
| 41 | { |
| 42 | std::cerr << "Changing password for encrypted eMMC" << std::endl; |
John Edward Broadbent | 4e13b0a | 2021-11-15 15:21:59 -0800 | [diff] [blame^] | 43 | std::string msg = "OpenBMC.0.1.DrivePasswordChanged"; |
| 44 | lg2::info("Starting change password", "REDFISH_MESSAGE_ID", msg); |
John Wedig | 2098dab | 2021-09-14 13:56:28 -0700 | [diff] [blame] | 45 | } |
| 46 | |
| 47 | } // namespace estoraged |