]> code.ossystems Code Review - openembedded-core.git/commitdiff
systemd: backport patch to fix reading journal backwards
authorJonathan Liu <net147@gmail.com>
Fri, 12 Dec 2014 13:16:29 +0000 (00:16 +1100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 31 Dec 2014 10:17:51 +0000 (10:17 +0000)
(From OE-Core rev: c0650feb6ce7151a22632bab7270002314a1b6be)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch [new file with mode: 0644]
meta/recipes-core/systemd/systemd_216.bb

diff --git a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch
new file mode 100644 (file)
index 0000000..911e2ff
--- /dev/null
@@ -0,0 +1,33 @@
+From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001
+From: Olivier Brunel <jjk@jjacky.com>
+Date: Fri, 5 Dec 2014 16:06:45 +0100
+Subject: [PATCH] journal: Fix navigating backwards missing entries
+
+With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
+needle was found as the last item in the array, it wasn't actually processed as
+match, resulting in entries being missed.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=86855
+
+Upstream-Status: Backport
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ src/journal/journal-file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
+index 7858435..c5d2d19 100644
+--- a/src/journal/journal-file.c
++++ b/src/journal/journal-file.c
+@@ -1657,7 +1657,7 @@ static int generic_array_bisect(
+                         }
+                 }
+
+-                if (k > n) {
++                if (k >= n) {
+                         if (direction == DIRECTION_UP) {
+                                 i = n;
+                                 subtract_one = true;
+--
+2.1.3
index b33f95e023e6099245f85f561379c1d382811087..8e1b5aaa7e4da71a8d27e6a108b12409cc61e976 100644 (file)
@@ -34,6 +34,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
            file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \
            file://0001-Make-root-s-home-directory-configurable.patch \
            file://0001-systemd-user-avoid-using-system-auth.patch \
+           file://0001-journal-Fix-navigating-backwards-missing-entries.patch \
            file://touchscreen.rules \
            file://00-create-volatile.conf \
            file://init \