summaryrefslogtreecommitdiffstats
path: root/dump_entry.cpp
blob: 6048b1cbe151bcfc5945d2b49d9d31950319af9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "dump_entry.hpp"

#include "dump_manager.hpp"

#include <phosphor-logging/log.hpp>

namespace phosphor
{
namespace dump
{

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
    parent.erase(id);
}

} // namespace dump
} // namespace phosphor
OpenPOWER on IntegriCloud