util.hpp (d4554f2a17686e36a77ac4a3619efd685fcbb15c) | util.hpp (15b63e12bdc3f3116fb841349dd4f1cd17a8398b) |
---|---|
1#pragma once 2#include "getConfig.hpp" 3 4#include <filesystem> 5#include <optional> 6#include <string> 7 8namespace estoraged --- 12 unchanged lines hidden (view full) --- 21 std::string driveType; 22 std::string driveProtocol; 23 24 DeviceInfo(std::filesystem::path& deviceFile, 25 std::filesystem::path& sysfsDir, std::string& luksName, 26 std::string& locationCode, uint64_t eraseMaxGeometry, 27 uint64_t eraseMinGeometry, std::string& driveType, 28 std::string& driveProtocol) : | 1#pragma once 2#include "getConfig.hpp" 3 4#include <filesystem> 5#include <optional> 6#include <string> 7 8namespace estoraged --- 12 unchanged lines hidden (view full) --- 21 std::string driveType; 22 std::string driveProtocol; 23 24 DeviceInfo(std::filesystem::path& deviceFile, 25 std::filesystem::path& sysfsDir, std::string& luksName, 26 std::string& locationCode, uint64_t eraseMaxGeometry, 27 uint64_t eraseMinGeometry, std::string& driveType, 28 std::string& driveProtocol) : |
29 deviceFile(deviceFile), 30 sysfsDir(sysfsDir), luksName(luksName), locationCode(locationCode), 31 eraseMaxGeometry(eraseMaxGeometry), eraseMinGeometry(eraseMinGeometry), 32 driveType(driveType), driveProtocol(driveProtocol) | 29 deviceFile(deviceFile), sysfsDir(sysfsDir), luksName(luksName), 30 locationCode(locationCode), eraseMaxGeometry(eraseMaxGeometry), 31 eraseMinGeometry(eraseMinGeometry), driveType(driveType), 32 driveProtocol(driveProtocol) |
33 {} 34}; 35 36/** @brief finds the size of the linux block device in bytes 37 * @param[in] devpath - the name of the linux block device 38 * @return size of a block device using the devPath 39 */ 40uint64_t findSizeOfBlockDevice(const std::string& devPath); --- 38 unchanged lines hidden --- | 33 {} 34}; 35 36/** @brief finds the size of the linux block device in bytes 37 * @param[in] devpath - the name of the linux block device 38 * @return size of a block device using the devPath 39 */ 40uint64_t findSizeOfBlockDevice(const std::string& devPath); --- 38 unchanged lines hidden --- |