Accepting request 79187 from home:oertel:branches:openSUSE:Factory

- update to GIT of today (6e4e2a000124f08f1a4e3791c2b02ec9ae6af393)
- many bugfixes
- Implement re-parsing of mcelog output in ASCII
- Add support for non-page aligned EFI Configuration Tables
- Add --debug-numerrors
- Add decoder for corrected XEN events to --ascii
- Correctly log kernel supplied time
- record the trigger info in the log
- mcelog: Implement dmi decoding for UEFI
- mcelog: Add usage information to mcelog for --ignorenodev
- Fix length calculation of SMBIOS mapping
- change disclaimer
- explictly spell out corrected errors

OBS-URL: https://build.opensuse.org/request/show/79187
OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=18
This commit is contained in:
Thomas Renninger 2011-08-18 15:12:58 +00:00 committed by Git OBS Bridge
parent 5c34794a1f
commit 797faf31d3
6 changed files with 101 additions and 66 deletions

View File

@ -1,22 +1,11 @@
---
Makefile | 10 +++
email.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
email.h | 32 ++++++++++
mcelog.c | 93 +++++++++++++++++++++++++++++++
mcelog.h | 1
msg.c | 8 ++
6 files changed, 325 insertions(+), 3 deletions(-)
Index: mcelog-1.0pre3.6363f5b719e9/Makefile
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/Makefile
+++ mcelog-1.0pre3.6363f5b719e9/Makefile
--- mcelog-1.0pre3.6e4e2a000124/Makefile
+++ mcelog-1.0pre3.6e4e2a000124/Makefile
@@ -1,3 +1,4 @@
+CONFIG_EMAIL := 1
CFLAGS := -g -Os
prefix := /usr
etcprefix :=
@@ -34,7 +35,8 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co
@@ -34,7 +35,8 @@
client.o cache.o sysfs.o yellow.o page.o rbtree.o \
xeon75xx.o sandy-bridge.o
DISKDB_OBJ := diskdb.o dimm.o db.o
@ -26,7 +15,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/Makefile
DOC := mce.pdf
ADD_DEFINES :=
@@ -46,6 +48,12 @@ OBJ += ${DISKDB_OBJ}
@@ -46,6 +48,12 @@
all: dbquery
endif
@ -39,10 +28,8 @@ Index: mcelog-1.0pre3.6363f5b719e9/Makefile
SRC := $(OBJ:.o=.c)
mcelog: ${OBJ}
Index: mcelog-1.0pre3.6363f5b719e9/email.c
===================================================================
--- /dev/null
+++ mcelog-1.0pre3.6363f5b719e9/email.c
--- mcelog-1.0pre3.6e4e2a000124/email.c
+++ mcelog-1.0pre3.6e4e2a000124/email.c
@@ -0,0 +1,184 @@
+#include <unistd.h>
+#include <signal.h>
@ -228,10 +215,8 @@ Index: mcelog-1.0pre3.6363f5b719e9/email.c
+ smtp_destroy_session (session);
+ return 0;
+}
Index: mcelog-1.0pre3.6363f5b719e9/email.h
===================================================================
--- /dev/null
+++ mcelog-1.0pre3.6363f5b719e9/email.h
--- mcelog-1.0pre3.6e4e2a000124/email.h
+++ mcelog-1.0pre3.6e4e2a000124/email.h
@@ -0,0 +1,32 @@
+#ifndef _MCELOG_EMAIL_H_
+#define _MCELOG_EMAIL_H_
@ -265,19 +250,17 @@ Index: mcelog-1.0pre3.6363f5b719e9/email.h
+#endif
+
+#endif
Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/mcelog.c
+++ mcelog-1.0pre3.6363f5b719e9/mcelog.c
--- mcelog-1.0pre3.6e4e2a000124/mcelog.c
+++ mcelog-1.0pre3.6e4e2a000124/mcelog.c
@@ -37,6 +37,7 @@
#include <assert.h>
#include <signal.h>
#include <pwd.h>
+#include <sys/wait.h>
#include <fnmatch.h>
#include "mcelog.h"
#include "paths.h"
#include "k8.h"
@@ -58,6 +59,9 @@
@@ -59,6 +60,9 @@
#include "yellow.h"
#include "page.h"
@ -287,7 +270,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
enum cputype cputype = CPU_GENERIC;
char *logfn = LOG_DEV_FILENAME;
@@ -69,7 +73,7 @@ static double cpumhz;
@@ -70,7 +74,7 @@
static int cpumhz_forced;
int ascii_mode;
int dump_raw_ascii;
@ -296,7 +279,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
static char *inputfile;
char *processor_flags;
static int foreground;
@@ -792,6 +796,7 @@ void usage(void)
@@ -914,6 +918,7 @@
"--num-errors N Only process N errors (for testing)\n"
"--pidfile file Write pid of daemon into file\n"
);
@ -304,15 +287,15 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
diskdb_usage();
print_cputypes();
exit(1);
@@ -855,6 +860,7 @@ static struct option options[] = {
{ "num-errors", 1, NULL, O_NUMERRORS },
@@ -979,6 +984,7 @@
{ "pidfile", 1, NULL, O_PIDFILE },
{ "debug-numerrors", 0, NULL, O_DEBUG_NUMERRORS }, /* undocumented: for testing */
DISKDB_OPTIONS
+ EMAIL_OPTIONS
{}
};
@@ -1026,11 +1032,86 @@ static void drop_cred(void)
@@ -1153,11 +1159,86 @@
}
}
@ -399,15 +382,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
if (recordlen == 0) {
Wprintf("no data in mce record\n");
@@ -1041,19 +1122,23 @@ static void process(int fd, unsigned rec
if (len < 0)
err("read");
- for (i = 0; (i < len / (int)recordlen) && !finish; i++) {
+ for (i = 0; (i < len / (int)recordlen) && !finish; i++) {
struct mce *mce = (struct mce *)(buf + i*recordlen);
mce_prepare(mce);
if (numerrors > 0 && --numerrors == 0)
@@ -1177,12 +1258,16 @@
finish = 1;
if (!mce_filter(mce, recordlen))
continue;
@ -424,7 +399,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
flushlog();
}
@@ -1161,6 +1246,8 @@ int main(int ac, char **av)
@@ -1293,6 +1378,8 @@
exit(0);
} else if (diskdb_cmd(opt, ac, av)) {
exit(0);
@ -433,7 +408,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
} else if (opt == 0)
break;
}
@@ -1169,6 +1256,8 @@ int main(int ac, char **av)
@@ -1301,6 +1388,8 @@
logfn = av[optind++];
if (av[optind])
usage();
@ -442,10 +417,18 @@ Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
checkdmi();
general_setup();
Index: mcelog-1.0pre3.6363f5b719e9/msg.c
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/msg.c
+++ mcelog-1.0pre3.6363f5b719e9/msg.c
--- mcelog-1.0pre3.6e4e2a000124/mcelog.h
+++ mcelog-1.0pre3.6e4e2a000124/mcelog.h
@@ -120,6 +120,7 @@
enum option_ranges {
O_COMMON = 500,
O_DISKDB = 1000,
+ O_EMAIL = 1500,
};
enum syslog_opt {
--- mcelog-1.0pre3.6e4e2a000124/msg.c
+++ mcelog-1.0pre3.6e4e2a000124/msg.c
@@ -8,10 +8,13 @@
#include "mcelog.h"
#include "msg.h"
@ -460,7 +443,7 @@ Index: mcelog-1.0pre3.6363f5b719e9/msg.c
static char *output_fn;
int need_stdout(void)
@@ -135,6 +138,11 @@ int Wprintf(char *fmt, ...)
@@ -135,6 +138,11 @@
n = vfprintf(output_fh ? output_fh : stdout, fmt, ap);
va_end(ap);
}
@ -472,15 +455,3 @@ Index: mcelog-1.0pre3.6363f5b719e9/msg.c
return n;
}
Index: mcelog-1.0pre3.6363f5b719e9/mcelog.h
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/mcelog.h
+++ mcelog-1.0pre3.6363f5b719e9/mcelog.h
@@ -122,6 +122,7 @@ enum cputype {
enum option_ranges {
O_COMMON = 500,
O_DISKDB = 1000,
+ O_EMAIL = 1500,
};
enum syslog_opt {

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a83e1f9483156db142c31e3eaf033412260ebe49c1edff6819854a1982501663
size 267451

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08355a9fb7be9d3ab94886bfbe7e639ea9fb33fcdb8bea103f67ad2870888557
size 270953

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Thu Aug 18 00:09:50 CEST 2011 - ro@suse.de
- update to GIT of today (6e4e2a000124f08f1a4e3791c2b02ec9ae6af393)
- many bugfixes
- Implement re-parsing of mcelog output in ASCII
- Add support for non-page aligned EFI Configuration Tables
- Add --debug-numerrors
- Add decoder for corrected XEN events to --ascii
- Correctly log kernel supplied time
- record the trigger info in the log
- mcelog: Implement dmi decoding for UEFI
- mcelog: Add usage information to mcelog for --ignorenodev
- Fix length calculation of SMBIOS mapping
- change disclaimer
- explictly spell out corrected errors
-------------------------------------------------------------------
Sat Jul 2 21:50:53 UTC 2011 - trenn@suse.de
- Update to latest git version (fate#311830)
Unfortunately versions have not been increased, latest tag
still is 1.0-pre3 (same as 1 year ago), therefore the date
is included in the version. I try to push maintainers to
increase the version number.
- Invert logic of db prefill messages -> info if it works, silent
if not
-------------------------------------------------------------------
Tue Jun 7 09:51:57 UTC 2011 - trenn@suse.de
@ -10,6 +38,15 @@ Mon Oct 25 15:48:57 CEST 2010 - trenn@suse.de
- Fix domainname for email notification
- Update to latest git version
-------------------------------------------------------------------
Tue Apr 6 15:15:45 CEST 2010 - trenn@suse.de
- Update to latest git version having quite some fixes (no features):
- Fixed some memleaks and made app valgrind conform
- Fixed theoretical DoS attack (bnc#586241)
- Added support of additional cpus
- Fixed a lot messages (in manpage, in triggers, in README, ...)
-------------------------------------------------------------------
Fri Feb 19 00:39:36 CET 2010 - ro@suse.de

View File

@ -21,7 +21,7 @@
Name: mcelog
License: GPLv2+
Summary: Log Machine Check Events
Version: 1.0pre3.6363f5b719e9
Version: 1.0pre3.6e4e2a000124
Release: 6
AutoReqProv: on
ExclusiveArch: x86_64
@ -33,6 +33,7 @@ Source1: mcelog.service
Source2: mcelog.sysconfig
Source6: README.email_setup
Patch1: email.patch
Patch2: mcelog_invert_prefill_db_warning.patch
Group: System/Monitoring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -55,6 +56,7 @@ Authors:
%prep
%setup
%patch1 -p1
%patch2 -p1
%build
export SUSE_ASNEEDED=0

View File

@ -0,0 +1,25 @@
---
memdb.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: mcelog-1.0.2011.06.08/memdb.c
===================================================================
--- mcelog-1.0.2011.06.08.orig/memdb.c
+++ mcelog-1.0.2011.06.08/memdb.c
@@ -417,11 +417,11 @@ void prefill_memdb(void)
md->location = xstrdup(bl);
md->name = xstrdup(dmi_getstring(&d->header, d->device_locator));
}
- if (missed) {
- static int warned;
- if (!warned) {
- Eprintf("failed to prefill DIMM database from DMI data");
- warned = 1;
+ if (!missed) {
+ static int db_rill_msg;
+ if (!db_rill_msg) {
+ Gprintf("Prefilled DIMM database from DMI data");
+ db_rill_msg = 1;
}
}
}