|
|
1c0fa8c |
From 3e2b4131453ffb0c76660d717413de238590056b Mon Sep 17 00:00:00 2001
|
|
|
1c0fa8c |
From: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
1c0fa8c |
Date: Mon, 13 Jul 2015 11:25:17 +0200
|
|
|
1c0fa8c |
Subject: [PATCH] a-dump-oops: allow update the problem, if more then one oops
|
|
|
1c0fa8c |
found
|
|
|
1c0fa8c |
|
|
|
1c0fa8c |
In case that found more than one oops process the first one.
|
|
|
1c0fa8c |
Without this patch the script exits with error in this case because expects
|
|
|
1c0fa8c |
only one oops.
|
|
|
1c0fa8c |
|
|
|
1c0fa8c |
Related to rhbz#1170534
|
|
|
1c0fa8c |
|
|
|
1c0fa8c |
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
1c0fa8c |
---
|
|
|
1c0fa8c |
src/plugins/abrt-dump-oops.c | 16 +++++++++++-----
|
|
|
1c0fa8c |
1 file changed, 11 insertions(+), 5 deletions(-)
|
|
|
1c0fa8c |
|
|
|
1c0fa8c |
diff --git a/src/plugins/abrt-dump-oops.c b/src/plugins/abrt-dump-oops.c
|
|
|
1c0fa8c |
index b1031ea..6f2f41b 100644
|
|
|
1c0fa8c |
--- a/src/plugins/abrt-dump-oops.c
|
|
|
1c0fa8c |
+++ b/src/plugins/abrt-dump-oops.c
|
|
|
1c0fa8c |
@@ -171,6 +171,17 @@ int main(int argc, char **argv)
|
|
|
1c0fa8c |
log("Updating problem directory");
|
|
|
1c0fa8c |
switch (g_list_length(oops_list))
|
|
|
1c0fa8c |
{
|
|
|
1c0fa8c |
+ case 0:
|
|
|
1c0fa8c |
+ {
|
|
|
1c0fa8c |
+ error_msg(_("Can't update the problem: no oops found"));
|
|
|
1c0fa8c |
+ errors = 1;
|
|
|
1c0fa8c |
+ break;
|
|
|
1c0fa8c |
+ }
|
|
|
1c0fa8c |
+ default:
|
|
|
1c0fa8c |
+ {
|
|
|
1c0fa8c |
+ log_notice(_("More oopses found: process only the first one"));
|
|
|
1c0fa8c |
+ }
|
|
|
1c0fa8c |
+ /* falls trought */
|
|
|
1c0fa8c |
case 1:
|
|
|
1c0fa8c |
{
|
|
|
1c0fa8c |
struct dump_dir *dd = dd_opendir(problem_dir, /*open for writing*/0);
|
|
|
1c0fa8c |
@@ -180,11 +191,6 @@ int main(int argc, char **argv)
|
|
|
1c0fa8c |
dd_close(dd);
|
|
|
1c0fa8c |
}
|
|
|
1c0fa8c |
}
|
|
|
1c0fa8c |
- break;
|
|
|
1c0fa8c |
- default:
|
|
|
1c0fa8c |
- error_msg(_("Can't update the problem: more than one oops found"));
|
|
|
1c0fa8c |
- errors = 1;
|
|
|
1c0fa8c |
- break;
|
|
|
1c0fa8c |
}
|
|
|
1c0fa8c |
}
|
|
|
1c0fa8c |
else
|
|
|
1c0fa8c |
--
|
|
|
1c0fa8c |
2.4.3
|
|
|
1c0fa8c |
|