blob: a9e865c66af9261016c3d10f9c9258610d78e23c [file] [log] [blame]
Matt Spinler711d51d2019-11-06 09:36:51 -06001/**
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 Spinlerdf13bdb2019-07-10 16:54:13 -050016#include "config.h"
17
18#include "paths.hpp"
19
20#include <filesystem>
21
22namespace openpower
23{
24namespace pels
25{
26
27namespace fs = std::filesystem;
28
29fs::path getPELIDFile()
30{
31 fs::path logIDPath{EXTENSION_PERSIST_DIR};
32 logIDPath /= fs::path{"pels"} / fs::path{"pelID"};
33 return logIDPath;
34}
35
Matt Spinler89fa0822019-07-17 13:54:30 -050036fs::path getPELRepoPath()
37{
38 std::filesystem::path repoPath{EXTENSION_PERSIST_DIR};
39 repoPath /= "pels";
40 return repoPath;
41}
42
Matt Spinler0d804ef2020-05-12 16:16:26 -050043fs::path getPELReadOnlyDataPath()
Matt Spinler367144c2019-09-19 15:33:52 -050044{
45 return std::filesystem::path{"/usr/share/phosphor-logging/pels"};
46}
Matt Spinlerdf13bdb2019-07-10 16:54:13 -050047
Matt Spinler367144c2019-09-19 15:33:52 -050048} // namespace pels
Matt Spinlerdf13bdb2019-07-10 16:54:13 -050049} // namespace openpower