Implementation of create interface.
Both the external and internal Dump managers define "Create"
interfaces. This commit implements these.
Change-Id: If857ec6ea7267fd72e9b420e6b44fa68b6abab66
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/dump_entry.cpp b/dump_entry.cpp
index 75c1358..373d8e4 100644
--- a/dump_entry.cpp
+++ b/dump_entry.cpp
@@ -1,17 +1,25 @@
#include "dump_entry.hpp"
+#include "dump_manager.hpp"
+
+#include <phosphor-logging/log.hpp>
namespace phosphor
{
namespace dump
{
-Entry::Entry(sdbusplus::bus::bus& bus, const char* obj): EntryIfaces(bus, obj)
-{
-}
-
+using namespace phosphor::logging;
void Entry::delete_()
{
+ //Delete Dump file from Permanent location
+ if (!fs::remove(file))
+ {
+ log<level::INFO>("Dump file doesn't exist.",
+ entry("Name=%s", file.c_str()));
+ }
+ // Remove Dump entry D-bus object
+ parent.erase(id);
}
} // namespace dump