Update dump manager and entry to have multiple types
Created a base dump entry, who ever implementing a new
dump type need to inherit from the base dump entry.
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Change-Id: Ie85d393f75ec697a7b02b84d131a4a8c0116c3e7
diff --git a/bmc_dump_entry.cpp b/bmc_dump_entry.cpp
new file mode 100644
index 0000000..10395d8
--- /dev/null
+++ b/bmc_dump_entry.cpp
@@ -0,0 +1,34 @@
+#include "bmc_dump_entry.hpp"
+
+#include "dump_manager.hpp"
+
+#include <phosphor-logging/log.hpp>
+
+namespace phosphor
+{
+namespace dump
+{
+namespace bmc
+{
+using namespace phosphor::logging;
+
+void Entry::delete_()
+{
+ // Delete Dump file from Permanent location
+ try
+ {
+ fs::remove_all(file.parent_path());
+ }
+ catch (fs::filesystem_error& e)
+ {
+ // Log Error message and continue
+ log<level::ERR>(e.what());
+ }
+
+ // Remove Dump entry D-bus object
+ phosphor::dump::Entry::delete_();
+}
+
+} // namespace bmc
+} // namespace dump
+} // namespace phosphor