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