[systemd-bugs] [Bug 64614] New: sd_journal_next after sd_journal_seek_tail is broken.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 15 00:05:38 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=64614

          Priority: medium
            Bug ID: 64614
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: sd_journal_next after sd_journal_seek_tail is broken.
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: marius.vollmer at redhat.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Created attachment 79325
  --> https://bugs.freedesktop.org/attachment.cgi?id=79325&action=edit
Test program.

>From the documentation, one might understand that sd_journal_seek_tail move to
the last entry and that a subsequent sd_journal_next would access that entry.
(Because it is worded very much like the docs for sd_journal_seek_head, which
works that way.)

In fact, sd_journal_seek_tail seems to move to just _after_ the last entry, and
one needs to use sd_journal_previous to access it.  I think this should be
documented more clearly.

What's worse is that if does call sd_journal_next after sd_journal_seek_tail,
this is successful and will access random entries.  Instead, I would expect
sd_journal_next to return 0 (or an error).  The attached program demonstrates
this.

I might try to provide some patches (docs and code), but with low priority.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130515/0b6b74b7/attachment.html>


More information about the systemd-bugs mailing list