estoraged.cpp (6978676100aa65c551e00ea58c6a891223f25be5) | estoraged.cpp (59dffa63af63ac1021f372e4505fb8c1b9084906) |
---|---|
1 2#include "estoraged.hpp" 3 | 1 2#include "estoraged.hpp" 3 |
4#include "cryptErase.hpp" |
|
4#include "cryptsetupInterface.hpp" 5#include "pattern.hpp" 6#include "verifyDriveGeometry.hpp" 7#include "zero.hpp" 8 9#include <libcryptsetup.h> 10#include <openssl/rand.h> 11#include <stdlib.h> --- 44 unchanged lines hidden (view full) --- 56{ 57 std::cerr << "Erasing encrypted eMMC" << std::endl; 58 lg2::info("Starting erase", "REDFISH_MESSAGE_ID", 59 std::string("OpenBMC.0.1.DriveErase")); 60 switch (inEraseMethod) 61 { 62 case EraseMethod::CryptoErase: 63 { | 5#include "cryptsetupInterface.hpp" 6#include "pattern.hpp" 7#include "verifyDriveGeometry.hpp" 8#include "zero.hpp" 9 10#include <libcryptsetup.h> 11#include <openssl/rand.h> 12#include <stdlib.h> --- 44 unchanged lines hidden (view full) --- 57{ 58 std::cerr << "Erasing encrypted eMMC" << std::endl; 59 lg2::info("Starting erase", "REDFISH_MESSAGE_ID", 60 std::string("OpenBMC.0.1.DriveErase")); 61 switch (inEraseMethod) 62 { 63 case EraseMethod::CryptoErase: 64 { |
65 CryptErase myCryptErase(devPath); 66 myCryptErase.doErase(); |
|
64 break; 65 } 66 case EraseMethod::VerifyGeometry: 67 { 68 VerifyDriveGeometry myVerifyGeometry(devPath); 69 uint64_t size = myVerifyGeometry.findSizeOfBlockDevice(); 70 myVerifyGeometry.geometryOkay(size); 71 break; --- 274 unchanged lines hidden --- | 67 break; 68 } 69 case EraseMethod::VerifyGeometry: 70 { 71 VerifyDriveGeometry myVerifyGeometry(devPath); 72 uint64_t size = myVerifyGeometry.findSizeOfBlockDevice(); 73 myVerifyGeometry.geometryOkay(size); 74 break; --- 274 unchanged lines hidden --- |