Skip to content
Snippets Groups Projects
Commit 134246d3 authored by Jonathan Liu's avatar Jonathan Liu Committed by Richard Purdie
Browse files

systemd: backport patch to fix reading journal backwards


(From OE-Core rev: 85029adf4f2dbf2d100f1d1b41c7a7323afc008b)

Signed-off-by: default avatarJonathan Liu <net147@gmail.com>
Signed-off-by: default avatarSaul Wold <sgw@linux.intel.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent c088bac2
Branches
Tags
No related merge requests found
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
......@@ -32,6 +32,7 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
file://uclibc-sysinfo_h.patch \
file://uclibc-get-physmem.patch \
file://sd-bus-don-t-use-assert_return-to-check-for-disconne.patch \
file://0001-journal-Fix-navigating-backwards-missing-entries.patch \
\
file://touchscreen.rules \
file://00-create-volatile.conf \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment