Matt Spinler | 711d51d | 2019-11-06 09:36:51 -0600 | [diff] [blame] | 1 | /** |
| 2 | * Copyright © 2019 IBM Corporation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Matt Spinler | df13bdb | 2019-07-10 16:54:13 -0500 | [diff] [blame] | 16 | #include "config.h" |
| 17 | |
| 18 | #include "paths.hpp" |
| 19 | |
| 20 | #include <filesystem> |
| 21 | |
| 22 | namespace openpower |
| 23 | { |
| 24 | namespace pels |
| 25 | { |
| 26 | |
| 27 | namespace fs = std::filesystem; |
| 28 | |
| 29 | fs::path getPELIDFile() |
| 30 | { |
| 31 | fs::path logIDPath{EXTENSION_PERSIST_DIR}; |
| 32 | logIDPath /= fs::path{"pels"} / fs::path{"pelID"}; |
| 33 | return logIDPath; |
| 34 | } |
| 35 | |
Matt Spinler | 89fa082 | 2019-07-17 13:54:30 -0500 | [diff] [blame] | 36 | fs::path getPELRepoPath() |
| 37 | { |
| 38 | std::filesystem::path repoPath{EXTENSION_PERSIST_DIR}; |
| 39 | repoPath /= "pels"; |
| 40 | return repoPath; |
| 41 | } |
| 42 | |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 43 | fs::path getMessageRegistryPath() |
| 44 | { |
| 45 | return std::filesystem::path{"/usr/share/phosphor-logging/pels"}; |
| 46 | } |
Matt Spinler | df13bdb | 2019-07-10 16:54:13 -0500 | [diff] [blame] | 47 | |
Matt Spinler | 367144c | 2019-09-19 15:33:52 -0500 | [diff] [blame] | 48 | } // namespace pels |
Matt Spinler | df13bdb | 2019-07-10 16:54:13 -0500 | [diff] [blame] | 49 | } // namespace openpower |