Dhruvaraj Subhashchandran | 69e6152 | 2020-02-04 06:39:11 -0600 | [diff] [blame] | 1 | #include "system_dump_entry.hpp" |
| 2 | |
Ramesh Iyyar | 2279386 | 2020-12-04 04:03:03 -0600 | [diff] [blame^] | 3 | #include "dump_utils.hpp" |
Ramesh Iyyar | 131994b | 2020-12-03 08:35:36 -0600 | [diff] [blame] | 4 | #include "host_transport_exts.hpp" |
Dhruvaraj Subhashchandran | 69e6152 | 2020-02-04 06:39:11 -0600 | [diff] [blame] | 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace dump |
| 9 | { |
| 10 | namespace system |
| 11 | { |
Dhruvaraj Subhashchandran | 69e6152 | 2020-02-04 06:39:11 -0600 | [diff] [blame] | 12 | |
| 13 | void Entry::initiateOffload(std::string uri) |
| 14 | { |
| 15 | phosphor::dump::Entry::initiateOffload(uri); |
Dhruvaraj Subhashchandran | 59642e2 | 2020-03-19 03:37:44 -0500 | [diff] [blame] | 16 | phosphor::dump::host::requestOffload(sourceDumpId()); |
Dhruvaraj Subhashchandran | 69e6152 | 2020-02-04 06:39:11 -0600 | [diff] [blame] | 17 | } |
| 18 | |
Ramesh Iyyar | 2279386 | 2020-12-04 04:03:03 -0600 | [diff] [blame^] | 19 | void Entry::delete_() |
| 20 | { |
| 21 | auto srcDumpID = sourceDumpId(); |
| 22 | |
| 23 | // Remove Dump entry D-bus object |
| 24 | phosphor::dump::Entry::delete_(); |
| 25 | |
| 26 | // Remove host system dump when host is up by using source dump id |
| 27 | // which is present in system dump entry dbus object as a property. |
| 28 | BootProgress bootProgressStatus = phosphor::dump::getBootProgress(); |
| 29 | if ((bootProgressStatus == BootProgress::SystemInitComplete) || |
| 30 | (bootProgressStatus == BootProgress::OSStart) || |
| 31 | (bootProgressStatus == BootProgress::OSRunning)) |
| 32 | { |
| 33 | phosphor::dump::host::requestDelete(srcDumpID); |
| 34 | } |
| 35 | } |
Dhruvaraj Subhashchandran | 69e6152 | 2020-02-04 06:39:11 -0600 | [diff] [blame] | 36 | } // namespace system |
| 37 | } // namespace dump |
| 38 | } // namespace phosphor |