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