Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 1 | #include "dump_entry.hpp" |
Jayanth Othayoth | a320c7c | 2017-06-14 07:17:21 -0500 | [diff] [blame] | 2 | #include "dump_manager.hpp" |
| 3 | |
| 4 | #include <phosphor-logging/log.hpp> |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace dump |
| 9 | { |
| 10 | |
Jayanth Othayoth | a320c7c | 2017-06-14 07:17:21 -0500 | [diff] [blame] | 11 | using namespace phosphor::logging; |
Jayanth Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 12 | |
| 13 | void Entry::delete_() |
| 14 | { |
Jayanth Othayoth | a320c7c | 2017-06-14 07:17:21 -0500 | [diff] [blame] | 15 | //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 Othayoth | 224882b | 2017-05-04 05:46:45 -0500 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | } // namespace dump |
| 26 | } // namepsace phosphor |