summaryrefslogtreecommitdiff
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-10-08 02:20:44 +0200
committerLennart Poettering <lennart@poettering.net>2011-10-08 02:21:05 +0200
commitcec736d21ff86c4ac81b4d306ddba2120333818c (patch)
tree4df4f1126307a4b6d066318e2f468847099beb4a /src/journal/journalctl.c
parentf4b4781191e8edfb5690e4447166e3ba7bcb48f5 (diff)
journal: implement parallel traversal in client
Diffstat (limited to 'src/journal/journalctl.c')
-rw-r--r--src/journal/journalctl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 7bcd842f6d..5f17f45cac 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -23,7 +23,7 @@
#include <errno.h>
#include <stddef.h>
-#include "journal-private.h"
+#include "journal-file.h"
int main(int argc, char *argv[]) {
int r;
@@ -62,21 +62,16 @@ int main(int argc, char *argv[]) {
uint64_t p, l;
p = le64toh(o->entry.items[i].object_offset);
- r = journal_file_move_to_object(f, p, &o);
+ r = journal_file_move_to_object(f, p, OBJECT_DATA, &o);
if (r < 0) {
log_error("Failed to move to data: %s", strerror(-r));
goto finish;
}
- if (le64toh(o->object.type) != OBJECT_DATA) {
- log_error("Invalid file");
- goto finish;
- }
-
l = o->object.size - offsetof(Object, data.payload);
printf("\t[%.*s]\n", (int) l, o->data.payload);
- r = journal_file_move_to_object(f, offset, &o);
+ r = journal_file_move_to_object(f, offset, OBJECT_ENTRY, &o);
if (r < 0) {
log_error("Failed to move back to entry: %s", strerror(-r));
goto finish;