1 #pragma once 2 3 #include "erase.hpp" 4 #include "util.hpp" 5 6 #include <string_view> 7 8 namespace estoraged 9 { 10 11 class VerifyDriveGeometry : public Erase 12 { 13 public: 14 /** @brief Creates a verifyDriveGeomentry erase object. 15 * 16 * @param[in] inDevPath - the linux device path for the block device. 17 */ 18 VerifyDriveGeometry(std::string_view inDevPath) : Erase(inDevPath) {} 19 20 /** @brief Test if input is in between the max and min expected sizes, 21 * and throws errors accordingly. 22 * 23 * @param[in] bytes - Size of the block device 24 */ 25 void geometryOkay() 26 { 27 geometryOkay(util::findSizeOfBlockDevice(devPath)); 28 } 29 void geometryOkay(uint64_t bytes); 30 }; 31 32 } // namespace estoraged 33