[systemd-commits] src/journal
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Aug 13 11:51:09 PDT 2014
src/journal/journald-kmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit b9c488f60050248b35640f28e4d00958702ba1c3
Author: Eelco Dolstra <eelco.dolstra at logicblox.com>
Date: Wed Aug 6 13:14:51 2014 +0200
journald: Fix off-by-one error in "Missed X kernel messages" warning
On receiving a message, "kernel_seqnum" is set to "serial + 1". So
subtracting 1 will cause messages like "Missed 0 kernel messages",
which should be "Missed 1 kernel messages".
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 9935986..fb8ea08 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -152,7 +152,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
/* Did we lose any? */
if (serial > *s->kernel_seqnum)
server_driver_message(s, SD_MESSAGE_JOURNAL_MISSED, "Missed %"PRIu64" kernel messages",
- serial - *s->kernel_seqnum - 1);
+ serial - *s->kernel_seqnum);
/* Make sure we never read this one again. Note that
* we always store the next message serial we expect
More information about the systemd-commits
mailing list