blob: 10395d8be03912cf54288772d52363575a15f784 [file] [log] [blame]
Dhruvaraj Subhashchandran4a98e8f2020-01-29 07:11:08 -06001#include "bmc_dump_entry.hpp"
2
3#include "dump_manager.hpp"
4
5#include <phosphor-logging/log.hpp>
6
7namespace phosphor
8{
9namespace dump
10{
11namespace bmc
12{
13using namespace phosphor::logging;
14
15void Entry::delete_()
16{
17 // Delete Dump file from Permanent location
18 try
19 {
20 fs::remove_all(file.parent_path());
21 }
22 catch (fs::filesystem_error& e)
23 {
24 // Log Error message and continue
25 log<level::ERR>(e.what());
26 }
27
28 // Remove Dump entry D-bus object
29 phosphor::dump::Entry::delete_();
30}
31
32} // namespace bmc
33} // namespace dump
34} // namespace phosphor