mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
man: mention that sd_journal_test_cursor() needs a positioning call
Fixes #30331.
This commit is contained in:
committed by
Lennart Poettering
parent
617a2be0d5
commit
aea6787f78
@@ -61,12 +61,6 @@
|
|||||||
and should be freed after use with
|
and should be freed after use with
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
<para>Note that <function>sd_journal_get_cursor()</function> will
|
|
||||||
not work before
|
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
(or related call) has been called at least once, in order to
|
|
||||||
position the read pointer at a valid entry.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_test_cursor()</function>
|
<para><function>sd_journal_test_cursor()</function>
|
||||||
may be used to check whether the current position in
|
may be used to check whether the current position in
|
||||||
the journal matches the specified cursor. This is
|
the journal matches the specified cursor. This is
|
||||||
@@ -75,10 +69,17 @@
|
|||||||
multiple different cursor strings, and hence string
|
multiple different cursor strings, and hence string
|
||||||
comparing cursors is not possible. Use this call to
|
comparing cursors is not possible. Use this call to
|
||||||
verify after an invocation of
|
verify after an invocation of
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
whether the entry being sought to was actually found
|
whether the entry being sought to was actually found
|
||||||
in the journal or the next closest entry was used
|
in the journal or the next closest entry was used
|
||||||
instead.</para>
|
instead.</para>
|
||||||
|
|
||||||
|
<para>Note that <function>sd_journal_get_cursor()</function>
|
||||||
|
and <function>sd_journal_test_cursor()</function>
|
||||||
|
will not work before
|
||||||
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
|
(or one of the other functions which move to an entry)
|
||||||
|
has been called at least once to position the read pointer at a valid entry.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
|
|||||||
@@ -82,8 +82,7 @@
|
|||||||
string. For details on cursors, see
|
string. For details on cursors, see
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
If no entry matching the specified cursor is found the call will seek to the next closest entry (in terms
|
If no entry matching the specified cursor is found the call will seek to the next closest entry (in terms
|
||||||
of time) instead. To verify whether the newly selected entry actually matches the cursor, use
|
of time) instead.</para>
|
||||||
<citerefentry><refentrytitle>sd_journal_test_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>Note that these calls do not actually make any entry the new current entry, this needs to be done
|
<para>Note that these calls do not actually make any entry the new current entry, this needs to be done
|
||||||
in a separate step with a subsequent
|
in a separate step with a subsequent
|
||||||
@@ -97,6 +96,13 @@
|
|||||||
used, the closest following entry will be sought to, if
|
used, the closest following entry will be sought to, if
|
||||||
<citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
is used the closest preceding entry is sought to.</para>
|
is used the closest preceding entry is sought to.</para>
|
||||||
|
|
||||||
|
<para>After the seek is done, and
|
||||||
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
|
or a similar call has been made,
|
||||||
|
<citerefentry><refentrytitle>sd_journal_test_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
|
may be used to verify whether the newly selected entry actually matches the cursor.
|
||||||
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
|
|||||||
Reference in New Issue
Block a user