xref: /openbmc/estoraged/include/erase.hpp (revision 7f2ab643)
1 #pragma once
2 #include <string>
3 
4 /** @class Erase
5  *  @brief Erase object provides a base class for the specific erase types
6  */
7 class Erase
8 {
9   public:
10     /** @brief creates an erase object
11      *  @param inDevPath the linux path for the block device
12      */
13     Erase(std::string_view inDevPath) : devPath(inDevPath)
14     {}
15     virtual ~Erase() = default;
16 
17     /** @brief finds the size of the linux block device in bytes
18      *  @return size of a block device using the devPath
19      */
20     uint64_t findSizeOfBlockDevice();
21 
22   protected:
23     /* The linux path for the block device */
24     std::string devPath;
25 };
26