diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-10-15 02:45:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-10-15 02:45:58 +0200 |
commit | 8725d60ae4f7a8471aa8a0207fa105e335d069a6 (patch) | |
tree | f988d72e906e5b005511cd5d028e030b7588eb36 /src/journal/journalctl.c | |
parent | e892bd1797e99c8afaa6afdbe413fda78937c9c3 (diff) |
journal: implement seek to head/tail
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r-- | src/journal/journalctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 3475b9d43c..3e5ee1af96 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -54,7 +54,8 @@ int main(int argc, char *argv[]) { } } - SD_JOURNAL_FOREACH(j) { + SD_JOURNAL_FOREACH_BEGIN(j) { + const void *data; size_t length; char *cursor; @@ -76,9 +77,10 @@ int main(int argc, char *argv[]) { (unsigned long long) realtime, (unsigned long long) monotonic); - SD_JOURNAL_FOREACH_FIELD(j, data, length) + SD_JOURNAL_FOREACH_DATA(j, data, length) printf("\t%.*s\n", (int) length, (const char*) data); - } + + } SD_JOURNAL_FOREACH_END(j); finish: if (j) |