From 82ebefe3a61d6effd82595b9fda5640643f66e8e Mon Sep 17 00:00:00 2001 From: Anton Arapov Date: Thu, 26 Mar 2009 16:33:26 +0100 Subject: kerneloops - plugin: rename files --- lib/Plugins/KerneloopsSysLog.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lib/Plugins/KerneloopsSysLog.h (limited to 'lib/Plugins/KerneloopsSysLog.h') diff --git a/lib/Plugins/KerneloopsSysLog.h b/lib/Plugins/KerneloopsSysLog.h new file mode 100644 index 0000000..95e5b49 --- /dev/null +++ b/lib/Plugins/KerneloopsSysLog.h @@ -0,0 +1,36 @@ +/* + * Copyright 2007, Intel Corporation + * Copyright 2009, Red Hat Inc. + * + * This file is part of %TBD% + * + * This program file is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program in a file named COPYING; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Anton Arapov + * Arjan van de Ven + */ + +#ifndef __INCLUDE_GUARD_KERNELOOPSLIB_H_ +#define __INCLUDE_GUARD_KERNELOOPSLIB_H_ + +/* borrowed from the kernel */ +#define barrier() __asm__ __volatile__("": : :"memory") +#define __unused __attribute__ ((__unused__)) + +extern int scan_logs(); + +#endif -- cgit From 6b54fffc7873f0006c19acc96f97b9781e1402ae Mon Sep 17 00:00:00 2001 From: Anton Arapov Date: Thu, 26 Mar 2009 16:47:00 +0100 Subject: kerneloops - plugin: huge changeset, make things more c++-ish, configurable syslog --- lib/Plugins/KerneloopsSysLog.h | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'lib/Plugins/KerneloopsSysLog.h') 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 */ -#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 +#include -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 m_OopsQueue; + int m_nFoundOopses; + + public: + CSysLog(); + std::list GetOopsList(); + void ClearOopsList(); + int ExtractOops(char *buffer, size_t buflen, int remove_syslog); +}; #endif -- cgit From 9466b938f7c79f394677f16ed9b128ab367e92fe Mon Sep 17 00:00:00 2001 From: Anton Arapov Date: Tue, 31 Mar 2009 11:52:00 +0200 Subject: kerneloops: correct copyrights and package relation. --- lib/Plugins/KerneloopsSysLog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Plugins/KerneloopsSysLog.h') diff --git a/lib/Plugins/KerneloopsSysLog.h b/lib/Plugins/KerneloopsSysLog.h index e0bf16f..66dfa54 100644 --- a/lib/Plugins/KerneloopsSysLog.h +++ b/lib/Plugins/KerneloopsSysLog.h @@ -2,7 +2,7 @@ * Copyright 2007, Intel Corporation * Copyright 2009, Red Hat Inc. * - * This file is part of %TBD% + * This file is part of Abrt. * * This program file is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the -- cgit