diff options
| author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-05-12 15:55:34 +0200 |
|---|---|---|
| committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-05-12 15:55:34 +0200 |
| commit | b6bc6d13eed2f346414d731ecb29579a719556f3 (patch) | |
| tree | b429d87c2dc7a7b97e2ee4fe19a2e1c1a5b1180d /lib/Plugins/KerneloopsScanner.h | |
| parent | f92d9b70a2cb12451f2df00a5a2f9a47e2b9c5ce (diff) | |
| parent | 6b77cb82cb7b918660435effb0fe356401bfdd55 (diff) | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Conflicts:
src/Daemon/Daemon.cpp
Diffstat (limited to 'lib/Plugins/KerneloopsScanner.h')
| -rw-r--r-- | lib/Plugins/KerneloopsScanner.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/Plugins/KerneloopsScanner.h b/lib/Plugins/KerneloopsScanner.h new file mode 100644 index 0000000..f823d1f --- /dev/null +++ b/lib/Plugins/KerneloopsScanner.h @@ -0,0 +1,38 @@ +#ifndef KERNELOOPSSCANNER_H_ +#define KERNELOOPSSCANNER_H_ + +#include "KerneloopsSysLog.h" +#include "Plugin.h" +#include "Action.h" + +class CKerneloopsScanner : public CAction +{ + private: + std::string m_sSysLogFile; + CSysLog m_pSysLog; + bool m_bSysLogFileScanned; + + void SaveOopsToDebugDump(); + void ScanDmesg(); + void ScanSysLogFile(const char *filename, int issyslog); + void WriteSysLog(int m_nCount); + public: + CKerneloopsScanner() : + m_sSysLogFile("/var/log/messages"), + m_bSysLogFileScanned(false) + {} + virtual ~CKerneloopsScanner() {} + virtual void Run(const std::string& pActionDir, + const std::string& pArgs); + virtual void LoadSettings(const std::string& pPath); +}; + +PLUGIN_INFO(ACTION, + CKerneloopsScanner, + "KerneloopsScanner", + "0.0.1", + "Save new Kerneloops crashes into debug dump dir", + "anton@redhat.com", + "http://people.redhat.com/aarapov"); + +#endif /* KERNELOOPSSCANNER_H_ */ |
