diff options
| author | Anton Arapov <aarapov@redhat.com> | 2009-03-26 16:47:00 +0100 |
|---|---|---|
| committer | Anton Arapov <aarapov@redhat.com> | 2009-03-26 16:47:00 +0100 |
| commit | 6b54fffc7873f0006c19acc96f97b9781e1402ae (patch) | |
| tree | 1bdab71a53afe311260ddaee415ffcda4b0611e3 /lib/Plugins/KerneloopsSysLog.h | |
| parent | 4932e17099e311cb1b4bd20c807a2cfe38990d90 (diff) | |
| download | abrt-6b54fffc7873f0006c19acc96f97b9781e1402ae.tar.gz abrt-6b54fffc7873f0006c19acc96f97b9781e1402ae.tar.xz abrt-6b54fffc7873f0006c19acc96f97b9781e1402ae.zip | |
kerneloops - plugin: huge changeset, make things more c++-ish, configurable syslog
Diffstat (limited to 'lib/Plugins/KerneloopsSysLog.h')
| -rw-r--r-- | lib/Plugins/KerneloopsSysLog.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/lib/Plugins/KerneloopsSysLog.h b/lib/Plugins/KerneloopsSysLog.h index 95e5b49..e0bf16f 100644 --- a/lib/Plugins/KerneloopsSysLog.h +++ b/lib/Plugins/KerneloopsSysLog.h @@ -24,13 +24,33 @@ * Arjan van de Ven <arjan@linux.intel.com> */ -#ifndef __INCLUDE_GUARD_KERNELOOPSLIB_H_ -#define __INCLUDE_GUARD_KERNELOOPSLIB_H_ +#ifndef __INCLUDE_GUARD_KERNELOOPSSYSLOG_H_ +#define __INCLUDE_GUARD_KERNELOOPSSYSLOG_H_ -/* borrowed from the kernel */ -#define barrier() __asm__ __volatile__("": : :"memory") -#define __unused __attribute__ ((__unused__)) +#include <string> +#include <list> -extern int scan_logs(); +class COops +{ + public: + std::string m_sData; + std::string m_sVersion; +}; + +class CSysLog +{ + private: + void QueueOops(char *data, char *version); + int ExtractVersion(char *linepointer, char *version); + void FillLinePointers(char *buffer, int remove_syslog); + std::list<COops> m_OopsQueue; + int m_nFoundOopses; + + public: + CSysLog(); + std::list<COops> GetOopsList(); + void ClearOopsList(); + int ExtractOops(char *buffer, size_t buflen, int remove_syslog); +}; #endif |
