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 | |
Matt Spinler | 271d143 | 2023-01-18 13:58:05 -0600 | [diff] [blame] | 19 | /** |
| 20 | * @brief Synchronize unwritten journal messages to disk. |
| 21 | * @details This is the same implementation as the systemd command |
| 22 | * "journalctl --sync". |
| 23 | */ |
| 24 | void journalSync(); |
| 25 | |
Matt Spinler | f61f292 | 2020-06-23 11:32:49 -0500 | [diff] [blame] | 26 | } // namespace phosphor::logging::util |