diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-04 11:57:38 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-04 11:57:38 +0100 |
commit | 5c62523ef0531243fbee0d58e19ecd808b431da6 (patch) | |
tree | e42800901d0e558c54cf2f267cf8b5cd3a92ed6a /src | |
parent | 610a6ea68a6d7fa4b4056de866816af734417fbe (diff) | |
download | abrt-5c62523ef0531243fbee0d58e19ecd808b431da6.tar.gz abrt-5c62523ef0531243fbee0d58e19ecd808b431da6.tar.xz abrt-5c62523ef0531243fbee0d58e19ecd808b431da6.zip |
koops: catch "kernel BUG at" with both small and capital K.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/KerneloopsSysLog.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/plugins/KerneloopsSysLog.c b/src/plugins/KerneloopsSysLog.c index f69503af..162fd977 100644 --- a/src/plugins/KerneloopsSysLog.c +++ b/src/plugins/KerneloopsSysLog.c @@ -218,32 +218,39 @@ next_line: if (oopsstart < 0) { - /* find start-of-oops markers */ - if (strstr(curline, "general protection fault:")) + /* Find start-of-oops markers */ + /* In some comparisons, we skip 1st letter, to avoid dealing with + * changes in capitalization in kernel. For example, I see that + * current kernel git (at 2011-01-01) has both "kernel BUG at ..." + * and "Kernel BUG at ..." messages, and I don't want to change + * the code below whenever kernel is changed to use "K" (or "k") + * uniformly. + */ + if (strstr(curline, /*g*/ "eneral protection fault:")) oopsstart = i; else if (strstr(curline, "BUG:")) oopsstart = i; - else if (strstr(curline, "kernel BUG at")) + else if (strstr(curline, /*k*/ "ernel BUG at")) oopsstart = i; else if (strstr(curline, "do_IRQ: stack overflow:")) oopsstart = i; else if (strstr(curline, "RTNL: assertion failed")) oopsstart = i; - else if (strstr(curline, "Eeek! page_mapcount(page) went negative!")) + else if (strstr(curline, /*e*/ "eek! page_mapcount(page) went negative!")) oopsstart = i; - else if (strstr(curline, "near stack overflow (cur:")) + else if (strstr(curline, /*n*/ "ear stack overflow (cur:")) oopsstart = i; - else if (strstr(curline, "double fault:")) + else if (strstr(curline, /*d*/ "ouble fault:")) oopsstart = i; - else if (strstr(curline, "Badness at")) + else if (strstr(curline, /*b*/ "adness at")) oopsstart = i; else if (strstr(curline, "NETDEV WATCHDOG")) oopsstart = i; else if (strstr(curline, "WARNING: at ")) /* WARN_ON() generated message */ oopsstart = i; - else if (strstr(curline, "Unable to handle kernel")) + else if (strstr(curline, /*u*/ "nable to handle kernel")) oopsstart = i; - else if (strstr(curline, "sysctl table check failed")) + else if (strstr(curline, /*s*/ "ysctl table check failed")) oopsstart = i; else if (strstr(curline, "INFO: possible recursive locking detected")) oopsstart = i; @@ -251,11 +258,12 @@ next_line: // by "Badness at", "kernel BUG at", or "WARNING: at" string //else if (strstr(curline, "------------[ cut here ]------------")) // oopsstart = i; - else if (strstr(curline, "list_del corruption.")) + else if (strstr(curline, "list_del corruption")) oopsstart = i; - else if (strstr(curline, "list_add corruption.")) + else if (strstr(curline, "list_add corruption")) oopsstart = i; - if (strstr(curline, "Oops:") && i >= 3) + + if (i >= 3 && strstr(curline, "Oops:")) oopsstart = i-3; if (oopsstart >= 0) |