blob: b0f4970a1bb69bda750a977c2a2af48fdc54f235 [file] [log] [blame]
John Edward Broadbenta6e3b992022-03-17 14:33:15 -07001#pragma once
John Edward Broadbent5d799bb2022-03-22 16:14:24 -07002#include <string>
John Edward Broadbenta6e3b992022-03-17 14:33:15 -07003
4namespace estoraged
5{
6namespace util
7{
8
John Edward Broadbent5d799bb2022-03-22 16:14:24 -07009/** @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 */
13uint64_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 */
19uint8_t findPredictedMediaLifeLeftPercent(const std::string& sysfsPath);
John Edward Broadbenta6e3b992022-03-17 14:33:15 -070020
21} // namespace util
22
23} // namespace estoraged