blob: c34891694426f11cf498499063e1d79ec9529f57 [file] [log] [blame]
Matt Spinlerf61f2922020-06-23 11:32:49 -05001#pragma once
2
3#include <fstream>
4#include <optional>
5#include <string>
6
7namespace 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 */
17std::optional<std::string> getOSReleaseValue(const std::string& key);
18
19} // namespace phosphor::logging::util