Dhruvaraj Subhashchandran | 4a98e8f | 2020-01-29 07:11:08 -0600 | [diff] [blame] | 1 | #include "bmc_dump_entry.hpp" |
| 2 | |
| 3 | #include "dump_manager.hpp" |
| 4 | |
| 5 | #include <phosphor-logging/log.hpp> |
| 6 | |
| 7 | namespace phosphor |
| 8 | { |
| 9 | namespace dump |
| 10 | { |
| 11 | namespace bmc |
| 12 | { |
| 13 | using namespace phosphor::logging; |
| 14 | |
| 15 | void 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 |