Matej Habrnal 1c0fa8
From df5536bae9e0346085afb57ad6b6b0b41cd52f69 Mon Sep 17 00:00:00 2001
Matej Habrnal 1c0fa8
From: "knoha@redhat.com" <knoha@redhat.com>
Matej Habrnal 1c0fa8
Date: Fri, 24 Jul 2015 07:56:02 +0200
Matej Habrnal 1c0fa8
Subject: [PATCH] abrt-merge-pstoreoops: merge files in descending order
Matej Habrnal 1c0fa8
Matej Habrnal 1c0fa8
fs/pstore reads the data from kmsg_dump_get_buffer(), which starts at
Matej Habrnal 1c0fa8
the end of the kmsg buffer, in a while loop and increases Part no. in
Matej Habrnal 1c0fa8
each iteration.
Matej Habrnal 1c0fa8
Matej Habrnal 1c0fa8
Related: rhbz#1233662
Matej Habrnal 1c0fa8
Matej Habrnal 1c0fa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
Matej Habrnal 1c0fa8
---
Matej Habrnal 1c0fa8
 src/hooks/abrt-merge-pstoreoops.c | 4 ++--
Matej Habrnal 1c0fa8
 1 file changed, 2 insertions(+), 2 deletions(-)
Matej Habrnal 1c0fa8
Matej Habrnal 1c0fa8
diff --git a/src/hooks/abrt-merge-pstoreoops.c b/src/hooks/abrt-merge-pstoreoops.c
Matej Habrnal 1c0fa8
index 6fc3109..36f1e0b 100644
Matej Habrnal 1c0fa8
--- a/src/hooks/abrt-merge-pstoreoops.c
Matej Habrnal 1c0fa8
+++ b/src/hooks/abrt-merge-pstoreoops.c
Matej Habrnal 1c0fa8
@@ -64,9 +64,9 @@ int compare_oops_texts(const void *a, const void *b)
Matej Habrnal 1c0fa8
         return -1;
Matej Habrnal 1c0fa8
     if (aa->panic_no > bb->panic_no)
Matej Habrnal 1c0fa8
         return 1;
Matej Habrnal 1c0fa8
-    if (aa->part_no < bb->part_no)
Matej Habrnal 1c0fa8
+    if (aa->part_no > bb->part_no)
Matej Habrnal 1c0fa8
         return -1;
Matej Habrnal 1c0fa8
-    return (aa->part_no > bb->part_no);
Matej Habrnal 1c0fa8
+    return (aa->part_no < bb->part_no);
Matej Habrnal 1c0fa8
 }
Matej Habrnal 1c0fa8
 
Matej Habrnal 1c0fa8
 int main(int argc, char **argv)
Matej Habrnal 1c0fa8
-- 
Matej Habrnal 1c0fa8
2.4.3
Matej Habrnal 1c0fa8