George Liu | ff92ffe | 2021-02-09 15:01:53 +0800 | [diff] [blame] | 1 | #include "config.h" |
| 2 | |
| 3 | #include "ramoops_manager.hpp" |
| 4 | |
George Liu | 858fbb2 | 2021-07-01 12:25:44 +0800 | [diff] [blame] | 5 | #include <fmt/core.h> |
| 6 | |
George Liu | ff92ffe | 2021-02-09 15:01:53 +0800 | [diff] [blame] | 7 | #include <phosphor-logging/elog-errors.hpp> |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | fs::path filePath(SYSTEMD_PSTORE_PATH); |
| 12 | if (!fs::exists(filePath)) |
| 13 | { |
George Liu | 858fbb2 | 2021-07-01 12:25:44 +0800 | [diff] [blame] | 14 | log<level::ERR>( |
| 15 | fmt::format("Pstore file path is not exists, FILE_PATH({})", |
| 16 | SYSTEMD_PSTORE_PATH) |
| 17 | .c_str()); |
George Liu | ff92ffe | 2021-02-09 15:01:53 +0800 | [diff] [blame] | 18 | return EXIT_FAILURE; |
| 19 | } |
| 20 | |
| 21 | phosphor::dump::ramoops::Manager manager(SYSTEMD_PSTORE_PATH); |
| 22 | |
| 23 | return EXIT_SUCCESS; |
| 24 | } |