Matt Spinler | f61f292 | 2020-06-23 11:32:49 -0500 | [diff] [blame] | 1 | #pragma once |
2 | |||||
3 | #include <fstream> | ||||
4 | #include <optional> | ||||
5 | #include <string> | ||||
6 | |||||
7 | namespace phosphor::logging::util | ||||
8 | { | ||||
9 | |||||
10 | /** | ||||
11 | * @brief Return a value found in the /etc/os-release file | ||||
12 | * | ||||
13 | * @param[in] key - The key name, like "VERSION" | ||||
14 | * | ||||
15 | * @return std::optional<std::string> - The value | ||||
16 | */ | ||||
17 | std::optional<std::string> getOSReleaseValue(const std::string& key); | ||||
18 | |||||
19 | } // namespace phosphor::logging::util |