blob: 373d8e4144fb873d8a9655252a2dbc5f78d78d80 [file] [log] [blame]
Jayanth Othayoth224882b2017-05-04 05:46:45 -05001#include "dump_entry.hpp"
Jayanth Othayotha320c7c2017-06-14 07:17:21 -05002#include "dump_manager.hpp"
3
4#include <phosphor-logging/log.hpp>
Jayanth Othayoth224882b2017-05-04 05:46:45 -05005
6namespace phosphor
7{
8namespace dump
9{
10
Jayanth Othayotha320c7c2017-06-14 07:17:21 -050011using namespace phosphor::logging;
Jayanth Othayoth224882b2017-05-04 05:46:45 -050012
13void Entry::delete_()
14{
Jayanth Othayotha320c7c2017-06-14 07:17:21 -050015 //Delete Dump file from Permanent location
16 if (!fs::remove(file))
17 {
18 log<level::INFO>("Dump file doesn't exist.",
19 entry("Name=%s", file.c_str()));
20 }
21 // Remove Dump entry D-bus object
22 parent.erase(id);
Jayanth Othayoth224882b2017-05-04 05:46:45 -050023}
24
25} // namespace dump
26} // namepsace phosphor