1 #include "bmc_dump_entry.hpp" 2 3 #include "dump_manager.hpp" 4 #include "dump_offload.hpp" 5 6 #include <phosphor-logging/log.hpp> 7 8 namespace phosphor 9 { 10 namespace dump 11 { 12 namespace bmc 13 { 14 using namespace phosphor::logging; 15 16 void Entry::delete_() 17 { 18 // Delete Dump file from Permanent location 19 try 20 { 21 fs::remove_all(file.parent_path()); 22 } 23 catch (fs::filesystem_error& e) 24 { 25 // Log Error message and continue 26 log<level::ERR>(e.what()); 27 } 28 29 // Remove Dump entry D-bus object 30 phosphor::dump::Entry::delete_(); 31 } 32 33 void Entry::initiateOffload(std::string uri) 34 { 35 phosphor::dump::offload::requestOffload(file, id, uri); 36 offloaded(true); 37 } 38 39 } // namespace bmc 40 } // namespace dump 41 } // namespace phosphor 42