X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=man%2Fsd_journal_get_cursor.xml;fp=man%2Fsd_journal_get_cursor.xml;h=9e00ef7c82f28b5b1255cda321df2a5e24d34658;hb=4a010f4e6e95964d7acaa33be768dbdb5e46d72a;hp=0000000000000000000000000000000000000000;hpb=b59866aefa110d368460edc14f98cd6d79fe05cd;p=elogind.git diff --git a/man/sd_journal_get_cursor.xml b/man/sd_journal_get_cursor.xml new file mode 100644 index 000000000..9e00ef7c8 --- /dev/null +++ b/man/sd_journal_get_cursor.xml @@ -0,0 +1,122 @@ + + + + + + + + + sd_journal_get_cursor + systemd + + + + Developer + Lennart + Poettering + lennart@poettering.net + + + + + + sd_journal_get_cursor + 3 + + + + sd_journal_get_cursor + Get cursor string for the current journal entry + + + + + #include <systemd/sd-journal.h> + + + int sd_journal_get_cursor + sd_journal* j + char ** cursor + + + + + + + Description + + sd_journal_get_cursor() + returns a cursor string for the current journal + entry. A cursor is a serialization of the current + journal position in text form. The string only + contains printable characters and can be passed around + in text form. The cursor identifies a journal entry + globally and in a stable way and may be used to later + seek to it via + sd_journal_seek_cursor3. The + cursor string should be considered opaque and not be + parsed by clients. Seeking to a cursor position + without the specific entry being available locally + will seek to the next closest (in terms of time) + available entry. The call takes two arguments: a + journal context object and a pointer to a + string pointer where the cursor string will be + placed. The string is allocated via libc malloc3 and should + be freed after use with + free3. + + Note that this function will not work before + sd_journal_next3 + (or related call) has been called at least + once, in order to position the read pointer at a valid entry. + + + + Return Value + + sd_journal_get_cursor() + returns 0 on success or a negative errno-style error + code. + + + + Notes + + The sd_journal_get_cursor() + interface is available as shared library, which can be + compiled and linked to with the + libsystemd-journal + pkg-config1 + file. + + + + See Also + + + systemd1, + sd-journal3, + sd_journal_open3, + sd_journal_seek_cursor3 + + + +