diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-31 03:58:05 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-31 03:58:05 +0200 |
commit | 9a2270d2c89f58fbed72d1811dfbe308fdf495ac (patch) | |
tree | 35bf64ad03e5d5c4ffe122bd2215e0cb2179497a /lib/Plugins/KerneloopsScanner.h | |
parent | b276cf3a378b33d2d965181357dfa2e3ddc07bc7 (diff) | |
download | abrt-9a2270d2c89f58fbed72d1811dfbe308fdf495ac.tar.gz abrt-9a2270d2c89f58fbed72d1811dfbe308fdf495ac.tar.xz abrt-9a2270d2c89f58fbed72d1811dfbe308fdf495ac.zip |
bug fixes in kerneloops scanner
CKerneloopsScanner::Run - scan syslog file first, then dmesg
(was other way around)
CKerneloopsScanner::SaveOopsToDebug - cast time_t and size_t to long
when we feed them to snprintf
CKerneloopsScanner::ScanSysLogFile - do not seek to negative offsets,
POSIX does not allow that
CSysLog::QueueOops - plug memory leak
Also used some abrtlib functions where appropriate, use open instead of fopen
where appropriate, do not check error in time() - it never fails,
move around bits of code in CKerneloopsScanner
to make it easier in future to create a tool for parsing
arbitrary files for oopses.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins/KerneloopsScanner.h')
-rw-r--r-- | lib/Plugins/KerneloopsScanner.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Plugins/KerneloopsScanner.h b/lib/Plugins/KerneloopsScanner.h index 2f28239..08f8c6c 100644 --- a/lib/Plugins/KerneloopsScanner.h +++ b/lib/Plugins/KerneloopsScanner.h @@ -13,9 +13,8 @@ class CKerneloopsScanner : public CAction bool m_bSysLogFileScanned; void SaveOopsToDebugDump(); - void ScanDmesg(); - void ScanSysLogFile(const char *filename, int issyslog); - void WriteSysLog(int m_nCount); + int ScanDmesg(); + int ScanSysLogFile(const char *filename, int issyslog); public: CKerneloopsScanner() : m_sSysLogFile("/var/log/messages"), |