diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-07-02 06:29:24 -0500 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-07-18 07:41:44 -0500 |
commit | bcb174bd33a34d47f07dc814dd23fba28ca466f8 (patch) | |
tree | 6b6aca2513c0f5f95698912fa8da8628a24ccc47 /dump_manager.cpp | |
parent | 671fc7f3e3b7f3cad762ff68548fb18559fdf091 (diff) | |
download | phosphor-debug-collector-bcb174bd33a34d47f07dc814dd23fba28ca466f8.tar.gz phosphor-debug-collector-bcb174bd33a34d47f07dc814dd23fba28ca466f8.zip |
Add support for user initiated BMC Dump
Added support for creating new dump entry d-bus objects for
user request dump.
Change-Id: I31d2f478418e312e0aa6cc321a885498cf6ec6d6
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Diffstat (limited to 'dump_manager.cpp')
-rw-r--r-- | dump_manager.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dump_manager.cpp b/dump_manager.cpp index d0376a5..3b00119 100644 --- a/dump_manager.cpp +++ b/dump_manager.cpp @@ -1,4 +1,5 @@ #include <unistd.h> +#include <sys/inotify.h> #include <phosphor-logging/elog-errors.hpp> @@ -112,5 +113,17 @@ void Manager::erase(uint32_t entryId) entries.erase(entryId); } +void Manager::watchCallback(const UserMap& fileInfo) +{ + for (const auto& i : fileInfo) + { + // For any new dump file create dump entry object. + if (IN_CLOSE_WRITE == i.second) + { + createEntry(i.first); + } + } +} + } //namespace dump } //namespace phosphor |