cryptoErase.cpp (d4554f2a17686e36a77ac4a3619efd685fcbb15c) cryptoErase.cpp (15b63e12bdc3f3116fb841349dd4f1cd17a8398b)
1#include "cryptErase.hpp"
2#include "cryptsetupInterface.hpp"
3#include "erase.hpp"
4
5#include <libcryptsetup.h>
6
7#include <phosphor-logging/lg2.hpp>
8#include <xyz/openbmc_project/Common/error.hpp>

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

14namespace estoraged
15{
16using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
17using sdbusplus::xyz::openbmc_project::Common::Error::ResourceNotFound;
18
19CryptErase::CryptErase(
20 std::string_view devPathIn,
21 std::unique_ptr<estoraged::CryptsetupInterface> inCryptIface) :
1#include "cryptErase.hpp"
2#include "cryptsetupInterface.hpp"
3#include "erase.hpp"
4
5#include <libcryptsetup.h>
6
7#include <phosphor-logging/lg2.hpp>
8#include <xyz/openbmc_project/Common/error.hpp>

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

14namespace estoraged
15{
16using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
17using sdbusplus::xyz::openbmc_project::Common::Error::ResourceNotFound;
18
19CryptErase::CryptErase(
20 std::string_view devPathIn,
21 std::unique_ptr<estoraged::CryptsetupInterface> inCryptIface) :
22 Erase(devPathIn),
23 cryptIface(std::move(inCryptIface))
22 Erase(devPathIn), cryptIface(std::move(inCryptIface))
24{}
25
26void CryptErase::doErase()
27{
28 /* get cryptHandle */
29 CryptHandle cryptHandle{devPath};
30 /* cryptLoad */
31 if (cryptIface->cryptLoad(cryptHandle.get(), CRYPT_LUKS2, nullptr) != 0)

--- 49 unchanged lines hidden ---
23{}
24
25void CryptErase::doErase()
26{
27 /* get cryptHandle */
28 CryptHandle cryptHandle{devPath};
29 /* cryptLoad */
30 if (cryptIface->cryptLoad(cryptHandle.get(), CRYPT_LUKS2, nullptr) != 0)

--- 49 unchanged lines hidden ---