John Edward Broadbent | a6e3b99 | 2022-03-17 14:33:15 -0700 | [diff] [blame] | 1 | #pragma once |
John Edward Broadbent | 5d799bb | 2022-03-22 16:14:24 -0700 | [diff] [blame] | 2 | #include <string> |
John Edward Broadbent | a6e3b99 | 2022-03-17 14:33:15 -0700 | [diff] [blame] | 3 | |
| 4 | namespace estoraged |
| 5 | { |
| 6 | namespace util |
| 7 | { |
| 8 | |
John Edward Broadbent | 5d799bb | 2022-03-22 16:14:24 -0700 | [diff] [blame] | 9 | /** @brief finds the size of the linux block device in bytes |
| 10 | * @param[in] devpath - the name of the linux block device |
| 11 | * @return size of a block device using the devPath |
| 12 | */ |
| 13 | uint64_t findSizeOfBlockDevice(const std::string& devPath); |
| 14 | |
| 15 | /** @brief finds the predicted life left for a eMMC device |
| 16 | * @param[in] sysfsPath - The path to the linux sysfs interface |
| 17 | * @return the life remaing for the emmc, as a percentage. |
| 18 | */ |
| 19 | uint8_t findPredictedMediaLifeLeftPercent(const std::string& sysfsPath); |
John Edward Broadbent | a6e3b99 | 2022-03-17 14:33:15 -0700 | [diff] [blame] | 20 | |
| 21 | } // namespace util |
| 22 | |
| 23 | } // namespace estoraged |